Skip to content

Custom exceptions throwing error #12693

Closed Answered by jimmo
ShocKwav3 asked this question in ESP8266
Oct 15, 2023 · 3 comments · 10 replies
Discussion options

You must be logged in to vote

@ShocKwav3 there's something about the way you're importing the exception from your exceptions directory... Back in the original post, the error is a bit subtle, but tells you that instead of importing SomeExceptionClass, you imported a module, but named it SomeExceptionClass. Perhaps you wrote

import something as SomeExceptionClass

??

Or perhaps something in exceptions/__init__.py is doing something strange?

The error you listed was:

Traceback (most recent call last):
  File "boot.py", line 17, in <module>
TypeError: unsupported types for : 'TypeError', 'module'

This means that it is trying to find an except block for an active TypeError, and it's trying to match it against something (S…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
8 replies
@shariltumin
Comment options

@peterhinch
Comment options

@ShocKwav3
Comment options

@shariltumin
Comment options

@ShocKwav3
Comment options

Comment options

You must be logged in to vote
1 reply
@ShocKwav3
Comment options

Answer selected by ShocKwav3
Comment options

You must be logged in to vote
1 reply
@ShocKwav3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants