-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Import Failed - No Matter What I Do? #2
Comments
Same problem here. non ascii char at 6973-6981, maybe some chinese char in the file. I found some but didn't helped me to rename it. |
I had ChatGPT helping me to fix the code and translate the comments. Bascially utf-8 support must be added to the file operations. Error handling was added too because some ComfyUI core files are modified and if this fails, they'll be wiped. So before you start, update ComfyUI so it can restore the files that got broken so far. Then the following 3 methods in the init.py of the node must be changed: You can just replace them with the code below accordingly: modify_js_file
modify_wedgets_js_file
modify_py_file
|
This doesn't seem to be related to this repository. There's a package in ComfyUIs manager showing up though that contains a node named TranslateText. If you got it from that pack, update/fix it using the manager. If it doesn't work uninstall the package that contains it also using the manager and then reinstall it. |
上面的方法成功帮我修复了文件名包含中文时GBK编码问题! |
Thanks @LeroyDaydreamer !! Your code changes fixed it for me! |
THX for Ur great work. |
File /web/extensions/core/uploadImage.js doesn`t exist really in ComfyUI! |
upgrade to new comfyui and simply modify ArtGallery/init.py wedgets_js_file_path = os.path.join(current_dir, '../../web/scripts/widgets.js') it will work now. |
no, ComfyUI hasn't these files in ../../web/assets/. |
Comfyui had upgraded , so must modify other files. |
use "git pull" to upgrade comfyui , and modify artgallery node init.py: uploadimg_js_file_path = os.path.join(current_dir, '../../web/assets/index-BMC1ey-i.js') wedgets_js_file_path = os.path.join(current_dir, '../../web/assets/index-DGAbdBYF.js') it will work now. |
UnicodeEncodeError: 'charmap' codec can't encode characters in position 154334-154342: character maps to |
you can try that in init.py modify the open function add "encoding='utf-8'" |
C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery../../web/extensions/core/uploadImage.js
Original code block not found.❌
File 'C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery../../folder_paths.py' updated successfully.✅
Traceback (most recent call last):
File "C:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1800, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init.py", line 256, in
modify_wedgets_js_file(wedgets_js_file_path, new_wedgets_js_content, new_wedgets_js_content_2)
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init_.py", line 153, in modify_wedgets_js_file
file.write(content)
File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode characters in position 6973-6981: character maps to
Cannot import C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery module for custom nodes: 'charmap' codec can't encode characters in position 6973-6981: character maps to
I have tried everything - I believe?
The text was updated successfully, but these errors were encountered: