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

'gbk' codec can't decode byte 0x80 in position 336: illegal multibyte sequence #6

Closed
chdldy opened this issue Feb 2, 2024 · 5 comments

Comments

@chdldy
Copy link

chdldy commented Feb 2, 2024

E:\Blender_ComfyUI\ComfyUI\custom_nodes\ComfyUI-ArtGallery../../web/extensions/core/uploadImage.js
Traceback (most recent call last):
File "E:\Blender_ComfyUI\ComfyUI\nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\Blender_ComfyUI\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init
.py", line 56, in
modify_js_file(uploadimg_js_file_path, new_js_content)
File "E:\Blender_ComfyUI\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init_.py", line 6, in modify_js_file
content = file.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 336: illegal multibyte sequence

Cannot import E:\Blender_ComfyUI\ComfyUI\custom_nodes\ComfyUI-ArtGallery module for custom nodes: 'gbk' codec can't decode byte 0x80 in position 336: illegal multibyte sequence

@LeroyDaydreamer
Copy link

That is most likely the same issue discussed in the other two threads, the missing UTF-8 handling. See this how to fix it. Keep in mind that whenever you update the custom nodes, it might be broken again and some core .js files get wiped, so you may not even see the ComfyUI's GUI anymore until you update ComfyUI.

@chdldy
Copy link
Author

chdldy commented Feb 19, 2024

image image Try this:

  • Change error files encoder into utf8,fast and convenient, without code change.

Thank you, this operation works

@chdldy chdldy closed this as completed Feb 19, 2024
@ZTWY35
Copy link

ZTWY35 commented Jul 5, 2024

image image Try this:

  • Change error files encoder into utf8,fast and convenient, without code change.将错误文件编码器修改为utf8,快速方便,无需更改代码。

Thank you, this operation works

我这已经看不到图片了,我也一样碰到这个问题,现没解决呢,我把D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init_.py 文件 编码改为UTF-8,还是报同样的错。

I'm still unable to see images, I've encountered the same issue and have yet to find a solution. After changing the encoding of the file D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init_.py to UTF-8, I'm still getting the same error.

@zmwv823
Copy link

zmwv823 commented Jul 6, 2024

image image Try this:

  • Change error files encoder into utf8,fast and convenient, without code change.将错误文件编码器修改为utf8,快速方便,无需更改代码。

Thank you, this operation works

我这已经看不到图片了,我也一样碰到这个问题,现没解决呢,我把D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery__init__.py 文件 编码改为UTF-8,还是报同样的错。

I'm still unable to see images, I've encountered the same issue and have yet to find a solution. After changing the encoding of the file D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery__init__.py to UTF-8, I'm still getting the same error.

The best way is to change code in __init__.py, add , encoding='UTF-8' after 'r' or 'w':

  • lines need to modify: 5-18-61-86-133-152.
  • An example:
with open(file_path, 'r', encoding='UTF-8') as file:

That's y i delete the comment.

@ZTWY35
Copy link

ZTWY35 commented Jul 8, 2024

image image Try this:

  • Change error files encoder into utf8,fast and convenient, without code change.将错误文件编码器修改为utf8,快速方便,无需更改代码。

Thank you, this operation works

我这已经看不到图片了,我也一样碰到这个问题,现没解决呢,我把D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery__init__.py 文件 编码改为UTF-8,还是报同样的错。
I'm still unable to see images, I've encountered the same issue and have yet to find a solution. After changing the encoding of the file D:\Program Files\ComfyUI_Mie_V2\ComfyUI\custom_nodes\ComfyUI-ArtGallery__init__.py to UTF-8, I'm still getting the same error.

The best way is to change code in , add after 'r' or 'w':__init__.py``, encoding='UTF-8'

  • lines need to modify: 5-18-61-86-133-152.
  • An example:
with open(file_path, 'r', encoding='UTF-8') as file:

That's y i delete the comment.

Thank you very much for your help, the problem has been resolved, thank you.

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

4 participants