State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.6v2|BugID:432861|
Problem summary:
There are two code snippets on the Callbacks and Events page in the Katana Developer Guide that both raise exceptions when executed in a Python tab within Katana.
Steps to reproduce:
import Callbacks
print dir(Callbacks.Type)
import Utils.EventModule
print Utils.EventModule.GetAllRegisteredEventTypes() Expected behaviour:
Imports of Katana-specific Python modules work.
Python code snippets use print() calls, not print statements.
Actual behaviour:
The import of the Callbacks module fails with an ImportError exception:
ImportError: No module named Callbacks The import of the Utils.EventModule module fails with an ImportError exception:
ImportError: No module named Utils.EventModule Python code snippets use print statements, not print() calls.
Workaround:
The Callbacks module can be imported from the "virtual" Katana module:
from Katana import Callbacks The Utils.EventModule module can be accessed by importing the Utils module from the "virtual" Katana module:
from Katana import Utils Tested versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why