Reputation: 100
Here is the stack trace:
Traceback (most recent call last):
File "V:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\ArenWorldExporter.py", line 73, in execute
_mkdir(self.filepath[:-4] + "\\models\\")
File "V:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\ArenWorldExporter.py", line 73, in _mkdir
_mkdir(self.filepath[:-4] + "\\models\\")
NameError: global name 'self' is not defined
Here is the code: http://pastebin.com/B2U0DAr8
All the spacing is set to 4 spaces, no tabs (not even sure if the python editor supports tabs)
Why is it saying that self is not defined? As it clearly is in the function.
Upvotes: 0
Views: 281
Reputation: 50970
The line:
_mkdir(self.filepath[:-4] + "\\models\\")
should be:
self._mkdir(self.filepath[:-4] + "\\models\\")
If you want to see a self
in _mkdir()
, it must be called on an instance.
Upvotes: 1