ID 536671 - The --prerender-publish command and the Pre-Render Publish Asset action errors out as it uses the file() function, which is removed in Python 3.

Follow

Problem summary
The --prerender-publish command and the Pre-Render Publish Asset action errors out as it uses the file() function, which is removed in Python 3. 

This issue also affects the Post-Render Publish Asset action and corresponding --postrender-publish command.
 
Customer reported version
Katana 6.0v1
 
Customer reported platform
CentOS 7
 
Steps to reproduce
 
1)  Open Katana and load the Hello Pony example scene via Help > Example Scenes.

2)  Create a Render node and connect it under the GafferThree node.

3)  Set the Edit flag to the Render node.
 
4)  In the Parameters tab navigate to outputs > primary, and click Action > Pre-Render Publish Asset.
 
Expected behaviour
Katana successfully runs the Pre-Render Publish action.
 
Actual behaviour
Katana errors out with NameError: name 'file' is not defined.
 
Workaround
Redefine the file() function in builtins (as an alias of open) to make it available in Python 3, this can be achieved by placing the following code in the init.py file of your KATANA_RESOURCES > Startup directory:
 
# Make `file()` available in Python 3.try:    import builtins    builtins.file = openexcept ImportError:    pass
 
Reproduced by support
This bug has been reproduced in:
Katana 6.0v1 - Windows 10, CentOS 7
Katana 5.0v5 - Windows 10, CentOS 7
Katana 5.0v1 - Windows 10, CentOS 7
 
Earliest version tested
Katana 5.0v1 - This feature did not exist before this version, prior versions of Katana use Python 2 where the file() function is not removed. 

    We're sorry to hear that

    Please tell us why