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'. 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. #22

Open
wangchaowei666 opened this issue Apr 24, 2021 · 0 comments

Comments

@wangchaowei666
Copy link

Traceback (most recent call last):
File "test.py", line 111, in
main()
File "test.py", line 50, in main
model.load_state_dict(torch.load(args.checkpoint))
File "/public/home/hpc0919170203/anaconda3/envs/GWN2/lib/python3.7/site-packages/torch/serialization.py", line 386, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "/public/home/hpc0919170203/anaconda3/envs/GWN2/lib/python3.7/site-packages/torch/serialization.py", line 548, in _load
_check_seekable(f)
File "/public/home/hpc0919170203/anaconda3/envs/GWN2/lib/python3.7/site-packages/torch/serialization.py", line 194, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/public/home/hpc0919170203/anaconda3/envs/GWN2/lib/python3.7/site-packages/torch/serialization.py", line 187, 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.

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