Curve Tools: Console spam with no active object #104943

Open
opened 2023-10-11 16:24:31 +02:00 by Kiellog · 1 comment

System Information
Operating system: Linux-6.5.6-arch2-1-x86_64-with-glibc2.38 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 535.113.01

Blender Version
Broken: version: 3.6.4, branch: makepkg (modified), commit date: 2023-09-25 13:24, hash: 21bfc5e7fe3f
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: Curve Tools (0, 4, 5)
Author: Mackraken, Spivak Vladimir (cwolf3d)

Short description of error
With no context.active_object, RMB in the empty scene (object context menu) will cause console spam

Exact steps for others to reproduce the error

  • Delete default cube
  • RMB object contest menu
  • Observe console output every time the menu is called:
AttributeError: 'NoneType' object has no attribute 'type'
Traceback (most recent call last):
  File "/usr/share/blender/3.6/scripts/modules/bpy_types.py", line 945, in draw_ls
    func(self, context)
  File "/usr/share/blender/3.6/scripts/addons/curve_tools/__init__.py", line 485, in curve_tools_object_context_menu
    if context.active_object.type == "CURVE":
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'type'

Suggestion: Insert if-conditional for context.active_object before querying the type.

**System Information** Operating system: Linux-6.5.6-arch2-1-x86_64-with-glibc2.38 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 535.113.01 **Blender Version** Broken: version: 3.6.4, branch: makepkg (modified), commit date: 2023-09-25 13:24, hash: `21bfc5e7fe3f` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: Curve Tools (0, 4, 5) Author: Mackraken, Spivak Vladimir (cwolf3d) **Short description of error** With no context.active_object, RMB in the empty scene (object context menu) will cause console spam **Exact steps for others to reproduce the error** - Delete default cube - RMB object contest menu - Observe console output every time the menu is called: ``` AttributeError: 'NoneType' object has no attribute 'type' Traceback (most recent call last): File "/usr/share/blender/3.6/scripts/modules/bpy_types.py", line 945, in draw_ls func(self, context) File "/usr/share/blender/3.6/scripts/addons/curve_tools/__init__.py", line 485, in curve_tools_object_context_menu if context.active_object.type == "CURVE": ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'type' ``` Suggestion: Insert if-conditional for context.active_object before querying the type.
Kiellog added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-10-11 16:24:31 +02:00
Member

Thanks for the report. I can confirm

Thanks for the report. I can confirm
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104943
No description provided.