Skip to content

Attribute Error: 'NoneType' object has no attribute 'xplane' #752

Description

@Rob-Neary

Blender 4.4.3

When starting Blender with an empty scene (no active object), the XPlane2Blender addon consistently prints the following error to the scripting console:

Python: Traceback (most recent call last):
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_xplane2blender\xplane_ui.py", line 105, in draw
draw_bake_op(self.layout)
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_xplane2blender\xplane_ui.py", line 83, in draw_bake_op
if context.active_object.xplane.isExportableRoot:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'xplane'

This seems to be happening because context.active_object is None on startup. The panel’s draw function assumes an active object is always present and tries to access xplane without checking.

Request: Could a guard be added so the panel only queries context.active_object.xplane when an object is selected? This would prevent the error from appearing on every Blender startup with an empty scene.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions