RuntimeError: unexpected EOF

I was trying to run the Python code from this page:

But when the Python interpreter gets to the line “waveglow = torch.hub.load(‘nvidia/DeepLearningExamples:torchhub’, ‘nvidia_waveglow’)”

I get the following error:

Traceback (most recent call last):
File “C:/Users/Public/Documents/Python/PycharmProjects/PyTorchTacotron2/”, line 10, in
waveglow = torch.hub.load(‘nvidia/DeepLearningExamples:torchhub’, ‘nvidia_waveglow’)
File “C:\Users\solargravity\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\”, line 363, in load
model = entry(*args, **kwargs)
File “C:\Users\solargravity/.cache\torch\hub\nvidia_DeepLearningExamples_torchhub/”, line 197, in nvidia_waveglow
ckpt = torch.load(ckpt_file)
File “C:\Users\solargravity\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\”, line 386, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File “C:\Users\solargravity\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\”, line 580, in _load
deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 1439144 more bytes. The file might be corrupted.

Process finished with exit code -1073740791 (0xC0000409)

I tried deleting the nvidia_DeepLearningExamples_torchhub directory which the code downloaded so that a new download is initiated but I still keep getting the same error. Has anyone had this issue before? I’m running Windows 10 and Python 3.7.

If you are using Window 10 machine, deleting vgg16-something in folder C:\Users\UserName\.cache\torch\checkpoints would solve probelm.

1 Like

Thanks! My notebook crashed while downloading and then I started having the same issue.

Didn’t realise this folder existed (I was clearing the hub cache only).
Funny enough, force_reload=True parameter didn’t help. I would expect it to do the right thing.