Blender is unable to generate a complete error message when there is bad indentation in python code #67295
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#67295
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender Version
Broken: 2.80 RC2 (Win 64)
Worked: 2.79b (Win 64)
Short description of error
Blender's built in Python interpreter is not able to load part of the error message when an
IndentationError
is thrown in 2.80.Exact steps for others to reproduce the error
Console output from 2.79
Console output from 2.80
Added subscriber: @nBurn
#65863 was marked as duplicate of this issue
blender/blender#68512 was marked as duplicate of this issue
bpy is not including line number when there is bad indentationto bpy is not including a line number when there is bad indentationbpy is not including a line number when there is bad indentationto Blender is unable to generate a complete error message when there is bad indentation in python codeAdded subscribers: @ideasman42, @you.le
I don't know if bpy_traceback.c changed, or if python was updated since 2.79b.
In bpy_traceback.c, void python_script_error_jump(...), there is this line:
if (exception && PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError)) {
What is weird is that an Indentation error is considered as a Syntax error.
I'm wondering if instead we should write:
if (exception && PyErr_GivenExceptionMatches(exception, PyExc_NotImplementedError)) {
In this case, the errors messages seems to be displayed correctly.
But this needs to be reviewed by @ideasman42 . Furthermore, this doesn't solve the issue to not have the line number in the error if we have a "NonImplemented" error I guess.
python C 3 exception handling code: https://docs.python.org/3/c-api/exceptions.html
Added subscriber: @mano-wii
It seems that this can even result in crash.
Added subscribers: @mutantbob, @zgorg, @tintwotin, @snuq
Added subscriber: @iss
Changed status from 'Confirmed' to: 'Resolved'
I can not reproduce this anymore.
Added subscribers: @aroefer, @lichtwerk