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

[Bug] Import Failed error #1

Closed
ricardofeynman opened this issue Dec 10, 2023 · 13 comments
Closed

[Bug] Import Failed error #1

ricardofeynman opened this issue Dec 10, 2023 · 13 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ricardofeynman
Copy link

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

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

jags111 commented Dec 13, 2023

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 jags111 self-assigned this Dec 13, 2023
@jags111 jags111 added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Dec 13, 2023
@jags111
Copy link
Owner

jags111 commented Dec 13, 2023

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

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

jags111 commented Dec 15, 2023

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

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

ricardofeynman commented Dec 22, 2023

@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 rsalmei/alive-progress#17 (comment) and this chriskiehl/Gooey#879 (comment)

Edit: Forgot about this pyinstaller/pyinstaller#1883 (comment)

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

@jags111
Copy link
Owner

jags111 commented Dec 22, 2023

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

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

jags111 commented Dec 26, 2023

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

jags111 commented Dec 26, 2023

let me know if any further error is reported thanks

@ricardofeynman
Copy link
Author

ricardofeynman commented Dec 26, 2023

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

jags111 commented Dec 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants