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

'NoneType' object has no attribute 'seek' #37

Open
chixinglong opened this issue May 16, 2024 · 0 comments
Open

'NoneType' object has no attribute 'seek' #37

chixinglong opened this issue May 16, 2024 · 0 comments

Comments

@chixinglong
Copy link

chixinglong commented May 16, 2024

  • Python version:3.9
  • Operating System: ubuntu 18.04
  • torch version: 1.12.1

What I Did

neuralplexer-inference --task=batched_structure_sampling
--input-receptor /media/dell/2T/cadd/proj_data/dock/NA/30.pdb
--input-ligand /media/dell/2T/cadd/proj_data/dock/NA/quercetin.sdf
--out-path /media/dell/2T/cadd/proj_data/dock/NA/
--n-samples 16
--chunk-size 4
--num-steps=40
--cuda
--sampler=langevin_simulated_annealing

###Error Reporting
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/np/bin/neuralplexer-inference", line 33, in
sys.exit(load_entry_point('neuralplexer', 'console_scripts', 'neuralplexer-inference')())
File "/media/dell/2T/cadd/NeuralPLexer-main/neuralplexer/inference.py", line 648, in main
model = NeuralPlexer.load_from_checkpoint(
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/pytorch_lightning/core/saving.py", line 137, in load_from_checkpoint
return _load_from_checkpoint(
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/pytorch_lightning/core/saving.py", line 158, in _load_from_checkpoint
checkpoint = pl_load(checkpoint_path, map_location=map_location)
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/lightning_lite/utilities/cloud_io.py", line 40, in _load
return torch.load(path_or_url, map_location=map_location)
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/torch/serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/torch/serialization.py", line 235, in _open_file_like
return _open_buffer_reader(name_or_buffer)
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/torch/serialization.py", line 220, in init
_check_seekable(buffer)
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/torch/serialization.py", line 311, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/home/dell/anaconda3/envs/np/lib/python3.9/site-packages/torch/serialization.py", line 304, 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.

Is this an issue with torch version mismatch?

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