Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'seek'. #4

Open
VicZlq opened this issue Oct 22, 2020 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'seek'. #4

VicZlq opened this issue Oct 22, 2020 · 0 comments

Comments

@VicZlq
Copy link

VicZlq commented Oct 22, 2020

Hello! Thank you very much for your wonderful work!
When I reproduced the code, some problems occurred:
First of all, I can't seem to generate the corresponding h5 file on the CoDraw data set. Do you have a classified data connection?
Then, when I tested the model, some problems appeared:
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "geneva/inference/test.py", line 64, in
tester = Tester(cfg, test_eval=True)
File "geneva/inference/test.py", line 31, in init
self.model.load(model_path, iteration)
File "/home/zhaoliuqing/GeNeVA/geneva/models/inference_models/recurrent_gan.py", line 111, in load
snapshot = _read_weights(pre_trained_path, iteration)
File "/home/zhaoliuqing/GeNeVA/geneva/models/inference_models/recurrent_gan.py", line 148, in _read_weights
snapshot = torch.load(pre_trained_path)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 358, in load
return _load(f, map_location, pickle_module)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 520, in _load
_check_seekable(f)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 179, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 172, in raise_err_msg
raise type(e)(msg)
AttributeError: 'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.
Have you ever encountered a similar problem? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant