AlignedReID icon indicating copy to clipboard operation
AlignedReID copied to clipboard

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0:

Open RisithPerera opened this issue 5 years ago • 3 comments

When I try to run the demo it produces this error. Traceback (most recent call last): File "Alignedreid_demo.py", line 26, in <module> checkpoint = torch.load("./market1501/checkpoint_ep300.pth.tar") File "C:\Anaconda\lib\site-packages\torch\serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "C:\Anaconda\lib\site-packages\torch\serialization.py", line 765, in _legacy_load result = unpickler.load() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0: invalid continuation byte

I'm using - Pytorch - 1.6.0 torchvision - 0.7.0

RisithPerera avatar Jan 21 '21 14:01 RisithPerera

Hello,You can try torch.load("./market1501/checkpoint_ep300.pth.tar", encoding='unicode_escape')

hy0523 avatar May 03 '21 06:05 hy0523

@ghy990523 ,hello, I had tried the method "torch.load("./market1501/checkpoint_ep300.pth.tar", encoding='unicode_escape')" ,but it was not working , and occured new error ,"'enconding is an invalid keyword argument for load()", can you help here?thanks in advance.

lilingdu avatar Apr 15 '22 07:04 lilingdu

Hello,you can try checkpoint = torch.load("./log/market1501/alignedreid/checkpoint_ep300.pth.tar",encoding = 'latin1')

ldknight avatar Jun 09 '22 07:06 ldknight