playground icon indicating copy to clipboard operation
playground copied to clipboard

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 64: illegal multibyte sequence

Open Atomadeus opened this issue 2 years ago • 2 comments

(rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> $env:sam_config = "vit_b" (rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> $env:sam_checkpoint_file = ".\sam_vit_b_01ec64.pth" (rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> $env:out_mask = "True" (rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> $env:out_bbox = "True" (rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> $env:device = "cuda:0" (rtmdet-sam) PS D:\anaconda3\envs\rtmdet-sam> label-studio-ml start sam --port 8003 --with sam_config=$env:sam_config sam_checkpoint_file=$env:sam_checkpoint_file out_mask=$env:out_mask out_bbox=$env:out_bbox device=$env:device Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "D:\anaconda3\envs\rtmdet-sam\lib\site.py", line 589, in main() File "D:\anaconda3\envs\rtmdet-sam\lib\site.py", line 576, in main known_paths = addsitepackages(known_paths) File "D:\anaconda3\envs\rtmdet-sam\lib\site.py", line 359, in addsitepackages addsitedir(sitedir, known_paths) File "D:\anaconda3\envs\rtmdet-sam\lib\site.py", line 208, in addsitedir addpackage(sitedir, name, known_paths) File "D:\anaconda3\envs\rtmdet-sam\lib\site.py", line 164, in addpackage for n, line in enumerate(f): UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 64: illegal multibyte sequence

I'm using Anaconda Powershell Prompt when get this error (Windows 10 Professional Edition 22H2)

Atomadeus avatar Jul 07 '23 14:07 Atomadeus

Check your Python environment: Make sure you are using the correct Python environment, and if necessary, activate the environment using the appropriate commands. It seems you are using the 'rtmdet-sam' environment based on the error message.

Update your environment: If you haven't done so already, try updating your Python environment using the package manager (e.g., conda or pip). This ensures that you have the latest versions of packages and dependencies.

Check the problematic file: The error message indicates an issue with the 'site.py' file in the 'D:\anaconda3\envs\rtmdet-sam\lib' directory. It is possible that the file has become corrupted or contains non-standard characters.

JimmyMa99 avatar Jul 08 '23 16:07 JimmyMa99

Thanks for your reply, I'll try it later.

Atomadeus avatar Jul 11 '23 18:07 Atomadeus