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

_pickle.UnpicklingError: invalid load key, 'v'. on Ubuntu 22.04 #27

Open
snowuyl opened this issue Sep 30, 2022 · 3 comments
Open

_pickle.UnpicklingError: invalid load key, 'v'. on Ubuntu 22.04 #27

snowuyl opened this issue Sep 30, 2022 · 3 comments

Comments

@snowuyl
Copy link

snowuyl commented Sep 30, 2022

Downloading: "https://download.pytorch.org/models/resnet34-b627a593.pth" to /home/snowuyl/.cache/torch/hub/checkpoints/resnet34-b627a593.pth
100.0%
Traceback (most recent call last):
File "/home/snowuyl/samba/workspace_Python/rPPG/run.py", line 65, in
runPOS(source)
File "/home/snowuyl/samba/workspace_Python/rPPG/run.py", line 39, in call
capture = CaptureFrames(self.batch_size, source, show_mask=True)
File "/home/snowuyl/samba/workspace_Python/rPPG/capture_frames.py", line 20, in init
self.model.load_state_dict(torch.load('linknet.pth'))
File "/home/snowuyl/.local/lib/python3.10/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/snowuyl/.local/lib/python3.10/site-packages/torch/serialization.py", line 920, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

@aljasser
Copy link

aljasser commented Oct 21, 2022

I resolve this issue by downloading the file using git lfs, you can remove linknet.pth, and run: git lfs install, git lfs pull

@Magicyp
Copy link

Magicyp commented Nov 7, 2022

What file is git lfs and where to download it

@burn-gif
Copy link

I resolve this issue by downloading the file using git lfs, you can remove linknet.pth, and run: git lfs install, git lfs pull

#:git lfs pull
Git LFS: (0 of 1 files) 0 B / 83.27 MB
batch response: Post https://github.com/nasir6/rPPG.git/info/lfs/objects/batch: dial tcp 20.205.243.166:443: getsockopt: connection refused
error: failed to fetch some objects from 'https://github.com/nasir6/rPPG.git/info/lfs'

Hello I also encountered this error, try your method, encountered the above error, it seems that the git lfs website is not connected

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

4 participants