YAD2K
YAD2K copied to clipboard
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 4296: character maps to <undefined>
I'm using Python 3.6 on Windows 10 64bit. I get the following error when I run C:\Users\in0131\Downloads\YAD2K-master\YAD2K-master>python ./yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
Loading weights.
Weights Header: [ 0 1 0 32013312]
Parsing Darknet config.
Traceback (most recent call last):
File "./yad2k.py", line 270, in <module>
_main(parser.parse_args())
File "./yad2k.py", line 89, in _main
unique_config_file = unique_config_sections(config_path)
File "./yad2k.py", line 54, in unique_config_sections
for line in fin:
File "C:\Users\in0131\AppData\Local\Continuum\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 4296: character maps to <undefined>
Any idea why is it happening so? Any help is greatly appreciated!
Try to do the process in a folder which path does not contain "\u" like "C:\Users...".
@tlindener , Thanks for you reply. I have tried it. But I still get the same error when I run
C:\YAD2K-master\YAD2K-master>python ./yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
Using TensorFlow backend.
Loading weights.
Weights Header: [ 0 1 0 32013312]
Parsing Darknet config.
Traceback (most recent call last):
File "./yad2k.py", line 270, in <module>
_main(parser.parse_args())
File "./yad2k.py", line 89, in _main
unique_config_file = unique_config_sections(config_path)
File "./yad2k.py", line 54, in unique_config_sections
for line in fin:
File "C:\Users\in0131\AppData\Local\Continuum\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 4296: character maps to <undefined>
Hmm, weird. Only difference between your and my setup would be the python version (I use 3.5 for yad2k). May be you can try this... Just create a new environment based on the environment.yml.
@tlindener , I created a new environment. But now when I run ./yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
I get the following error:
Using TensorFlow backend.
Traceback (most recent call last):
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./yad2k.py", line 15, in <module>
from keras import backend as K
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/keras/__init__.py", line 3, in <module>
from . import activations
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/keras/activations.py", line 3, in <module>
from . import backend as K
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/keras/backend/__init__.py", line 73, in <module>
from .tensorflow_backend import *
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1, in <module>
import tensorflow as tf
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/manjeera/anaconda3/envs/yad2k/lib/python3.6/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
@tlindener , Oh I am assuming this is an error with CUDA. I am actually running this on a CPU. Any idea how to avoid this error?
I have the same problem with python 3.5.4 and Win7. Any idea what to try?