-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Errors cannot be printed/formatted in 3.12+ because DynamicScope object is not iterable #565
Comments
Wow this is bad ! I don not get why it leads to a segfault but we need to do better. I will look into it ASAP. |
It's a sigabort not segfault. Would it make sense to just have DynamicScope iterate over it's f_locals (even though it's not the full scope)? |
It fixes the sigabort but provides no hints frmdstryr@8cca5aa |
My guess is the iterable thing is just a red herring. Probably something to
do with the generated bytecode or an issue with the c++ code somewhere.
First step to finding it would be to make a minimal viable example which
reproduces the issue.
…On Fri, Jan 10, 2025 at 08:11 frmdstryr ***@***.***> wrote:
It fixes the sigabort but provides no hints ***@***.***
<frmdstryr@8cca5aa>
—
Reply to this email directly, view it on GitHub
<#565 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABBQSKNDKMFWLYTDUGOXW32J7IJJAVCNFSM6AAAAABU6MWJSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBSG44TQMJVGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'm not sure it's something with bytecode... it looks like the DynamicScope is assigned right to the frame's f_local variable?
Since it's a name error the traceback looks in the locals to try and suggest a mistyped name at https://github.com/python/cpython/blob/main/Lib/traceback.py#L1507. |
IPython also can't be embedded in a event handler/d func for a similar reason as it tries to access
|
Interesting. Good finds. I wonder if this is a Py 2 vs 3 change. IIRC in Py 2, the https://github.com/nucleic/enaml/blob/main/enaml/src/funchelper.cpp#L53 So if |
Fixed by #571 |
It seems any error in an enaml expression/event callback with python 3.12+ causes the application to sigabort because errors cannot be printed (by pyqt or any other logging).
For example
Causes this:
Without the try/except it occurs in pyqt.
In enaml-web any error now shuts down the whole application..
The text was updated successfully, but these errors were encountered: