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

Original code block not found - uploadImage.js is empty #5

Open
dexusno opened this issue Jan 25, 2024 · 10 comments
Open

Original code block not found - uploadImage.js is empty #5

dexusno opened this issue Jan 25, 2024 · 10 comments

Comments

@dexusno
Copy link

dexusno commented Jan 25, 2024

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?

@LankyPoet
Copy link

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
Copy link

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
Copy link

modify_wedgets_js_file(wedgets_js_file_path, new_wedgets_js_content, new_wedgets_js_content_2)
line 256 in init.py, it's trying to edit that file

@LeroyDaydreamer
Copy link

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

@Lomakinn
Copy link

Lomakinn commented Jan 28, 2024

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
Copy link

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

@xiaolui12
Copy link

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

@LeroyDaydreamer
Copy link

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?

@jazzydog
Copy link

jazzydog commented May 1, 2024

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

@nyukers
Copy link

nyukers commented Sep 29, 2024

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.

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

7 participants