BGE logic: Debug mode for Python module controllers forbids script renaming
Open, Needs TriagePublic


System Information
Linux Mint 64b
Geforce GT650M

Blender Version
Broken: from 2.76 official to 2.79 - latest build

Short description of error
Debug mode for controllers has a bug...
Module reloading in Python controller debug mode fails if the script file has been renamed between two BGE executions.

Exact steps for others to reproduce the error

  1. download and open the attached .blend file bug_controller_debug.blend
  2. rename the script from "test1" to any other name, for example "test2", both in the Text Editor and the Controller in the Logic Bricks
  3. start the game; it will instantaneously quit as requested by the script
  4. rename the script again to some other name
  5. restart the game; this time it won't quit and instead send the following error (up to the Blender version) to stderr:
Python module can't be reloaded - object 'Cube', controller 'Python':
Traceback (most recent call last):
  File "/home/Programmes/blender-2.76b/2.76/python/lib/python3.4/", line 315, in reload
    return importlib.reload(module)
  File "/home/Programmes/blender-2.76b/2.76/python/lib/python3.4/importlib/", line 149, in reload
  File "<frozen importlib._bootstrap>", line 1134, in exec
AttributeError: 'NoneType' object has no attribute 'name'

Thus it looks like some script caching problem.



Add Comment