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

UnicodeDecodeError on Windows10 #37

Open
TimeHunter618 opened this issue Mar 27, 2020 · 3 comments
Open

UnicodeDecodeError on Windows10 #37

TimeHunter618 opened this issue Mar 27, 2020 · 3 comments

Comments

@TimeHunter618
Copy link

TimeHunter618 commented Mar 27, 2020

Thank you sincerely for your work. I got a stuck in running the code, which is as follow :

My env is:
win10, anaconda, pytorch=1.1.0 with cuda auto installed by conda

An UnicodeDecodeError happened when I running:
(ad) λ p python 1_train_predictor.py --data ecg --filename chfdb_chf01_275.pkl

The error is:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 93: invalid continuation byte

The detail is:
`> building the model
The using device is : cuda
Traceback (most recent call last):

File "1_train_predictor.py", line 115, in
model = model.to(device(args.device))

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\nn\modules\module.py", line 386, in to
return self._apply(convert)

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\nn\modules\module.py", line 193, in _apply
module._apply(fn)

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\nn\modules\rnn.py", line 127, in _apply self.flatten_parameters()

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\nn\modules\rnn.py", line 100, in flatten_parameters if not any_param.is_cuda or not torch.backends.cudnn.is_acceptable(any_param):

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\backends\cudnn_init_.py", line 105, in is_acceptable
if _libcudnn() is None:

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\backends\cudnn_init_.py", line 48, in _libcudnn
lib = find_cudnn_windows_lib()

File "E:\ProgramSoftW\Anaconda\Installed\envs\ad\lib\site-packages\torch\backends\cudnn_init_.py", line 32, in find_cudnn_windows_lib
out = out.decode().strip()

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 93: invalid continuation byte`

The solutions I had try are:

  • I tried to use pytorch=0.4.0 and pytorch=1.1.0 seperately in python 3.5 and 3.6 3.7,but it doesn't work

  • I tried to run it use cpu. It works. But It takes too long.

  • I tried to change the encoding way, encoding='utf-8'. It worked partly

I cann't figure out what's happened in cuda or pytorch with the error. Looking for Ur reply~

@ivanokeeffe
Copy link

Hi did you solve this issue yet?

@TimeHunter618
Copy link
Author

Hi did you solve this issue yet?

I haven't solve it yet.

@HYixuann
Copy link

Try to download the dataset on the official website.

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

3 participants