Skip to content

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

@VicZlq

Description

@VicZlq

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions