ID 228162 - Batch rendering fails if .katana directory cannot be created

Follow

Problem summary

In interactive mode, Katana needs write access to the user's home directory in order to create a '.katana' directory. In batch mode, this should not be a requirement.

Before 2.5, Katana logged a warning during batch rendering if '.katana' could not be created. In 2.5+, Katana prints an exception after the warning and exits.

Reproduction steps

These reproduction steps apply to Linux.

  1. Create a fake home directory: mkdir /tmp/fakehome
  2. Make the fake home directory read-only: chmod -w /tmp/fakehome
  3. Launch Katana with the fake home directory assigned to the HOME environment variable:

    HOME=/tmp/fakehome $KATANA_ROOT/katana --batch --asset $KATANA_ROOT/demos/katana_files/aovs_prman.katana -t 1
    • Expected: Katana prints a warning ('[WARN python.PyUtilModule.ResourceFiles]: Unable to create user .katana directory') but renders successfully
    • Actual: Katana prints a warning, then prints an exception and exits

Exception

Traceback (most recent call last):  File "python/Main/Main.py", line 367, in <module>  File "python/Main/Main.py", line 313, in __main  File "bin/python/Main/MainBatch.py", line 130, in Main  File "bin/python/Main/MainBatch.py", line 827, in __renderFrames  File "bin/python/PyUtilModule/RenderManager/RenderCore.py", line 675, in StartRenderLegacy  File "bin/python/UI4/KatanaPrefs/__init__.py", line 40, in <module>  File "bin/python/UI4/Manifest.py", line 76, in <module>  File "bin/python/FnKatImport.py", line 177, in Package  File "bin/python/FnKatImport.py", line 212, in _FindAndImportPackage  File "bin/python/UI4/software_python/AssetBrowser/v0/__init__.py", line 14, in <module>  File "bin/python/UI4/software_python/AssetBrowser/v0/FileBrowser.py", line 20, in <module>  File "bin/python/UI4/software_python/AssetBrowser/v0/FileBrowser.py", line 25, in Browser  File "bin/python/python_katana/KatanaResources/v0/ResourceFiles.py", line 151, in GetUserKatanaPathOSError: [Errno 13] Permission denied: '/tmp/home/rrender/.katana'

    We're sorry to hear that

    Please tell us why