ComfyUI-ArtGallery icon indicating copy to clipboard operation
ComfyUI-ArtGallery copied to clipboard

Original code block not found - uploadImage.js is empty

Open dexusno opened this issue 1 year ago • 10 comments

I see others have had the same issue as I, when trying to load ComfyUI-ArtGallery. It looks like the files "uploadImage.js" is a 0 byte empty file.

Has anyone any solution to how to install this custom node?

dexusno avatar Jan 25 '24 23:01 dexusno

D:\ComfyUI\custom_nodes\ComfyUI-ArtGallery\../../web/extensions/core/uploadImage.js
Original code block not found.❌
File 'D:\ComfyUI\custom_nodes\ComfyUI-ArtGallery\../../folder_paths.py' updated successfully.✅
Traceback (most recent call last):
  File "D:\ComfyUI\nodes.py", line 1872, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\ComfyUI\custom_nodes\ComfyUI-ArtGallery\__init__.py", line 256, in <module>
    modify_wedgets_js_file(wedgets_js_file_path, new_wedgets_js_content, new_wedgets_js_content_2)
  File "D:\ComfyUI\custom_nodes\ComfyUI-ArtGallery\__init__.py", line 153, in modify_wedgets_js_file
    file.write(content)
  File "C:\Users\Default.LivingRoomPC\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 7809-7817: character maps to <undefined>

Cannot import D:\ComfyUI\custom_nodes\ComfyUI-ArtGallery module for custom nodes: 'charmap' codec can't encode characters in position 7809-7817: character maps to <undefined>

LankyPoet avatar Jan 26 '24 03:01 LankyPoet

Looks like the art gallery is ruining other js files. Most importantly the widgets.js file which then prevents comfy from loading right.

Please address ASAP. Thank you!

LankyPoet avatar Jan 26 '24 03:01 LankyPoet

https://github.com/ZHO-ZHO-ZHO/ComfyUI-ArtGallery/blob/4e7b86c8b4b7e9a6270db86977833bead06941e3/init.py#L256 line 256 in init.py, it's trying to edit that file

LankyPoet avatar Jan 26 '24 03:01 LankyPoet

See my comment on the "import failed" issue how to fix this.

LeroyDaydreamer avatar Jan 28 '24 11:01 LeroyDaydreamer

See my comment on the "import failed" issue how to fix this.

Unfortunally, this fix cant help me(( I see error in console and blank screen in web(

image

Lomakinn avatar Jan 28 '24 12:01 Lomakinn

huh... i fix it with (after changing code in init.jy)

  1. goto ComfyUI dir
  2. git clean --df
  3. git reset --hard origin/master

Lomakinn avatar Jan 28 '24 16:01 Lomakinn

D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery../../web/extensions/core/uploadImage.js Traceback (most recent call last): File "D:\AI\ComfyUI_windows_portable\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 "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ArtGallery_init.py", line 56, in modify_js_file(uploadimg_js_file_path, new_js_content) File "D:\AI\ComfyUI_windows_portable\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

xiaolui12 avatar Jan 30 '24 21:01 xiaolui12

There is no such script named "ComfyUI-ArtGallery_init.py" in this repository, it should be just "__init__py". Have you updated this as described here?

LeroyDaydreamer avatar Feb 01 '24 15:02 LeroyDaydreamer

huh... i fix it with (after changing code in init.jy)

  1. goto ComfyUI dir
  2. git clean --df
  3. git reset --hard origin/master

Thank you for help

jazzydog avatar May 01 '24 09:05 jazzydog

There is no such script named "ComfyUI-ArtGallery_init.py" in this repository, it should be just "__init__py". Have you updated this as described here?

Your solution remove 'Import Failed' error, but don't remove error about uploadImage.js.

nyukers avatar Sep 29 '24 11:09 nyukers