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

Fix load error messages not having a stack trace #2508

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

RunDevelopment
Copy link
Member

While implementing #2507, I forgot the iterator_inputs=IteratorInputInfo(inputs=0) which prevented the node from loading. Those were the errors messages that were logged:

[2024-01-24 16:10:11 +0100] [8492] [WARNING] Failed to load packages.chaiNNer_standard.utility.math.accumulate (C:\Users\micha\Git\chaiNNer\backend\src\packages\chaiNNer_standard\utility\math\accumulate.py):
[2024-01-24 16:10:11 +0100] [8492] [WARNING]

Pretty useless. No message, not even a stack trace. Turns out that logger.warning(e.error) only logs the error message but never the stack trace. So I used exc_info=e.error to get the stack trace.

The full error with stack trace was this btw:

[2024-01-24 16:12:59 +0100] [1608] [WARNING] Failed to load packages.chaiNNer_standard.utility.math.accumulate (C:\Users\micha\Git\chaiNNer\backend\src\packages\chaiNNer_standard\utility\math\accumulate.py):
Traceback (most recent call last):
  File "C:\Users\micha\Git\chaiNNer\backend\src\api\api.py", line 477, in load_nodes
    importlib.import_module(module, package=None)
  File "C:\Python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\micha\Git\chaiNNer\backend\src\packages\chaiNNer_standard\utility\math\accumulate.py", line 44, in <module>
    @math_group.register(
  File "C:\Users\micha\Git\chaiNNer\backend\src\api\api.py", line 223, in register
    assert len(iterator_inputs) == 1 and len(iterator_outputs) == 0
AssertionError

@joeyballentine joeyballentine merged commit 565fa71 into chaiNNer-org:main Jan 24, 2024
14 checks passed
@RunDevelopment RunDevelopment deleted the fix-load-errr-mesg branch January 24, 2024 20:30
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

Successfully merging this pull request may close these issues.

2 participants