dangweili / pedestrian-attribute-recognition-pytorch

A simple baseline for pedestrian attribute recognition in surveillance scenarios
332 stars 80 forks source link

UnicodeDecodeError #2

Closed choys73 closed 6 years ago

choys73 commented 6 years ago

when I tried the "python script/dataset/transform_rap.py", I got the UnicodeDecodeError.

Traceback (most recent call last): File "script/dataset/transform_rap.py", line 75, in generate_data_description(save_dir) File "script/dataset/transform_rap.py", line 28, in generate_data_description data = loadmat(open('./dataset/rap/RAP_annotation/RAP_annotation.mat', 'r')) File "/home/cho/anaconda3/envs/visdial-chal/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 141, in loadmat MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs) File "/home/cho/anaconda3/envs/visdial-chal/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 65, in mat_reader_factory mjv, mnv = get_matfile_version(byte_stream) File "/home/cho/anaconda3/envs/visdial-chal/lib/python3.6/site-packages/scipy/io/matlab/miobase.py", line 222, in get_matfile_version mopt_bytes = fileobj.read(4) File "/home/cho/anaconda3/envs/visdial-chal/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xee in position 133: invalid continuation byte

What can I do to resolve this problem?

choys73 commented 6 years ago

It just python version problem. when I use python version 2.7, It is resolved.

azikk commented 5 years ago

hello I'm using the python3.6 that I wanna to add some functions which have already done in python3 , do you have any idea how can I run this code under python3 ?

azikk commented 5 years ago

fine I run transform_peta.py based on python2 and trying to run demo.py based on python3 now (๑•̀ㅂ•́)و✧