jags111 / ComfyUI_Jags_Audiotools

A collection amazing audio tools for working with audio and sound files in comfyUI
MIT License
61 stars 6 forks source link

[Bug] Import Failed error #1

Closed ricardofeynman closed 10 months ago

ricardofeynman commented 11 months ago

Thanks for releasing, I'm really excited about this one! I'm unsure if your note in the Readme is a request not to post bug issues yet... Sorry if I'm jumping the gun but just in case this helps:

Traceback (most recent call last): File "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/nodes.py", line 1800, 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 "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/init.py", line 23, in from .SampleDiffusion import * File "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/SampleDiffusion.py", line 122, in libs = os.path.join(comfy_dir, 'custom_nodes/ComfyUI_Jags_Audiotools/libs') File "/usr/lib/python3.10/posixpath.py", line 76, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType

Cannot import /home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools module for custom nodes: expected str, bytes or os.PathLike object, not NoneType

GentlemanHu commented 11 months ago

same here.

Traceback (most recent call last):
  File "/content/drive/colab_ai/ComfyUI/nodes.py", line 1805, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/colab_ai/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/__init__.py", line 23, in <module>
    from .SampleDiffusion import *
  File "/content/drive/colab_ai/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/SampleDiffusion.py", line 122, in <module>
    libs = os.path.join(comfy_dir, 'custom_nodes/ComfyUI_Jags_Audiotools/libs')
  File "/usr/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Cannot import /content/drive/colab_ai/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools module for custom nodes: expected str, bytes or os.PathLike object, not NoneType
jags111 commented 10 months ago

Hai the init py is getting updated and will post a note here so you can correct same and update. Only one node is failing and that is save audio node all rest is fine and will rerun a check and update again

jags111 commented 10 months ago

I have updated all the files and checked same for any errors and kindly have an update or reinstall and check same. All errors are eliminated. Only one major change I will do now is naming all TENSOR to AUDIO so no confusion.

ricardofeynman commented 10 months ago

Thanks, I've given the newest commit a try, but am still getting an import failure with a different error message.

I have attached the edited version of my notetaking from the terminal as I worked through trying to resolve the errors. It should offer some insight as to where the issue is occuring. I have noted my suspicions in the txt file, but no clear picture yet...

AUDIOTOOLS DEBUG EDITED.txt

I still have a few things to try after some wreckless pip installing messed up a few additional nodes... After resolving most of the version conflicts that caused, when I'm launching ComfyUI at present the only import fail / error thrown in the terminal now relates to the Audiotools custom nodes.

Current error is at the bottom of the attached txt file.

Do you know whether - Cannot import ..... ComfyUI_Jags_Audiotools module for custom nodes: 'ComfyUIManagerLogger' object has no attribute 'isatty' - is possibly something to do with a missing dependency in " diffusion 6.10.1" which i'm presently having to address some conflicts with?

jags111 commented 10 months ago

no i am correcting same for any link error.. I will update it in a few minutes. Okay the error was coming from the libs file not getting called from the particular file in the diffuser lib throwing an error and is fixed now and all modules will install and run.

Still loading the audio files and playback some issues which are not resolved so far and will be done in a day or two max

ricardofeynman commented 10 months ago

Thanks, I've just given the newest version a try, both as an upgrade, and then as a fresh install to custom nodes via the manager. Both ways of updating to the newest commit still unfortunately give the error attached:

AUDIOTOOLS ISATTY IMPORT ERROR.txt

ricardofeynman commented 10 months ago

@jags111 Hi I've tried out the newest 110C from an hour ago and I'm still getting that same error:

Copying JS files for Workflow loading Traceback (most recent call last): File "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/nodes.py", line 1813, 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 "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/init.py", line 23, in from .SampleDiffusion import * File "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/SampleDiffusion.py", line 44, in hijack_import("diffusion", "v-diffusion-pytorch") File "/home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools/SampleDiffusion.py", line 38, in hijack_import importlib.import_module(importname) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/x/.local/lib/python3.10/site-packages/diffusion/init.py", line 4, in from .internal.protocol import SessionId File "/home/x/.local/lib/python3.10/site-packages/diffusion/internal/protocol/init.py", line 14, in import structlog File "/home/x/.local/lib/python3.10/site-packages/structlog/init.py", line 10, in from structlog import dev, processors, stdlib, testing, threadlocal, types File "/home/x/.local/lib/python3.10/site-packages/structlog/stdlib.py", line 31, in from ._config import get_logger as _generic_get_logger File "/home/x/.local/lib/python3.10/site-packages/structlog/_config.py", line 43, in colors=_use_colors and sys.stdout is not None and sys.stdout.isatty() AttributeError: 'ComfyUIManagerLogger' object has no attribute 'isatty'

Cannot import /home/x/Documents/_ComfyUI_2023-11-25_1735C/ComfyUI/custom_nodes/ComfyUI_Jags_Audiotools module for custom nodes: 'ComfyUIManagerLogger' object has no attribute 'isatty'

I went looking into isatty for clues and found this https://github.com/rsalmei/alive-progress/issues/17#issuecomment-553581153 and this https://github.com/chriskiehl/Gooey/issues/879#issuecomment-1586511649

Edit: Forgot about this https://github.com/pyinstaller/pyinstaller/issues/1883#issuecomment-196540123

I think these threads could offer some insight into why the isatty exception is being thrown, and/or how to mitigate it.

jags111 commented 10 months ago

hey I think the issue is coming from the samplediffusion.py and i have made changes so hijack part of the script will not occur again and things should be okay now. If still some error please provide the exact copy so can improve on same. Please note i am having some issues with the play sound script as it is still having play function from java script not working with comfy back end. I should be able to test same and clean that up.

ricardofeynman commented 10 months ago

Hi, I've just taken a moment to test and unfortunately I'm still getting the import error when updating to commit 112. I've attached the terminal readout from the install of 112 [283e169]

JAGS AUDIOTOOLS FRESH INSTALL COMMIT 112.txt

jags111 commented 10 months ago

Hai. Thanks for testing same and wonderful for your cooperation. I have modified all the code that was referencing same and added all fresh scripts in. Also some three nodes still have some issue that i am working on .. Other than that most of the nodes are loading fine.

2023-12-26_21-47-55 2023-12-26_21-40-41
jags111 commented 10 months ago

let me know if any further error is reported thanks

ricardofeynman commented 10 months ago

WIll test right now, many thanks.

Edit: Can confirm that I no longer get errors.

[4a9bdd2] commit 123 imports without issue. Will test thoroughly in the days ahead. Appreciate you helping me, and really excited I can now get started with your audiotools!

jags111 commented 10 months ago

hai please note some nodes are still having issues and trying to solve same. Thanks for your support.