I get this error when I try to run my script from the text editor. It is a simple exporter with some extra functions.
This code snippet is the culprit for the error:
@classmethod
def poll(cls, context):
sfile = context.space_data
operator = sfile.active_operator
return operator.bl_idname == 'TEST_OT_advanced_export'
TEST_OT_advanced_export is my bl_idname. After running I am constantly getting the following error in my system console:
AttributeError: 'SpaceTextEditor' object has no attribute 'active_operator'
As far as I know, I need the poll function inside my class so that my defined custom attributes that appear in the File Browser do not appear when another function from Blender shows the File Browser. My script works perfectly fine, but it is spamming the error into the system console. How can I resolve that?