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

Unpickling stack underflow #83

Open
west-codes opened this issue Oct 28, 2020 · 3 comments
Open

Unpickling stack underflow #83

west-codes opened this issue Oct 28, 2020 · 3 comments

Comments

@west-codes
Copy link

When I try to run models/download_models.py, I get the following error:
'''
Downloading the VGG-19 model
Traceback (most recent call last):
File "models/download_models.py", line 10, in
sd = load_url("https://web.eecs.umich.edu/~justincj/models/vgg19-d01eb7cb.pth")
File "/home/wroge/anaconda3/envs/neural-style-env/lib/python3.8/site-packages/torch/hub.py", line 559, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/home/wroge/anaconda3/envs/neural-style-env/lib/python3.8/site-packages/torch/serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/wroge/anaconda3/envs/neural-style-env/lib/python3.8/site-packages/torch/serialization.py", line 764, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: unpickling stack underflow
'''

@ProGamerGov
Copy link
Owner

@West102 What version of PyTorch are you using?

@west-codes
Copy link
Author

@ProGamerGov I am using PyTorch version 1.7.0 and Python 3.8.5

@ProGamerGov
Copy link
Owner

ProGamerGov commented Oct 28, 2020

@West102 I can't seem to reproduce the issue with PyTorch 1.7.0, though I was using Python 3.6. I also didn't see anything in the change notes that would cause this issue. There's various reports of similar issues on the PyTorch Github page, but no mention of the cause. Have you tried reinstalling PyTorch? Can you reliably reproduce the error?

I also have copies of the models (with the correct changes) available for download here: https://drive.google.com/drive/folders/1OGKfoIehp2MiJL2Iq_8VMTy76L6waGC8

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

2 participants