AWS Thinkbox Discussion Forums

sitecustomize.py?

Hi there,

We have our centralized python libraries that are controlled by the local machine environment via a sitecustomize installed in every python distribution we use.

For deadline, we have placed it here:

C:\Program Files\Thinkbox\Deadline6\bin\lib\site-packages\sitecustomize.py

And it seems to work just fine when running the dpython.exe in the bin folder:

C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe

Turned off pyc generation
Loading config: dpythoncfg
Not found. Trying with all lowercase: dpythoncfg
Detected config not found dpythoncfg falling back to default config
Config path = \S2\exchange\software\managed\pythonScripts\sitecustomize\ScanlineSite\configs\default.py
Clearing QT environment variables
Resetting QT environment variables \s2\exchange\software\managed\Libraries\Qt\4.5.0_x64
Adding site path //s2/exchange/software/managed/pythonScripts/site-packages
Adding site path //s2/exchange/software/managed/pythonScripts/site-packages_2.6_64
Adding site path //s2/exchange/software/managed/pythonScripts/site-packages_configured/sip/windows_amd64_msc8_python26__4_8
Adding site path //s2/exchange/software/managed/pythonScripts/site-packages_configured/PyQt4/windows_amd64_msc8_python26__pyqt4_5_qt4_5_0
Adding site path //s2/exchange/software/managed/pythonScripts/site-packages_configured/scl/windows_amd64_msc9_python26__qt4_7_1_internal
Scanline Site Initialized

Python 2.6.7 (r267:88850, Jun 21 2011, 13:39:32) [MSC v.1500 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import scanline.Paths

However, when we try to import our libs from deadline plugins, it seems to fail with the following log. Any ideas?:

=======================================================
Error

Fatal error in StartJob: plugin script “C:\Documents and Settings\ScanlineVFX\Local Settings\Application Data\Thinkbox\Deadline6\slave\LAPRO0321\plugins\Nuke.py”: Python Exception: ImportError : No module named scanline.Paths (Python.Runtime.PythonException)
Type: <type ‘exceptions.ImportError’>
Value: No module named scanline.Paths
Stack Trace:
[’ File “none”, line 13, in \n’]
(System.Exception)
at FranticX.Scripting.PythonNetScriptEngine.a(Exception A_0)
at FranticX.Scripting.PythonNetScriptEngine.ExecuteScript(String scriptName, String script)
at Deadline.Scripting.DeadlineScriptManager.CreateScopeFromFile(String scopeName, String scriptFile, Boolean addGlobalFunctions, Boolean redirectToScriptManagerListener)
at Deadline.Plugins.ScriptPlugin.a(String A_0, String A_1, String A_2)
at Deadline.Plugins.ScriptPlugin.a(String A_0, String A_1, String A_2)
at Deadline.Plugins.ScriptPlugin.b(Job A_0)
at Deadline.Plugins.ScriptPlugin.StartJob(Job job, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type

RenderPluginException

=======================================================
Stack Trace

at Deadline.Plugins.Plugin.StartJob(Job job)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)

=======================================================
Full Log

0: Plugin will be reloaded because a new job has been loaded, or one of the job files or plugin files has been modified
0: Loaded plugin: Nuke
0: Task timeout is 72000 seconds (Regular Task Timeout)
0: Loaded job: [BURN] Nuke Render: TST_000_0000_tcomp_comp_v0001_ssl.nk (51db9b911cc9a41bfc9c2d09)
0: INFO: Executing plugin script C:\Documents and Settings\ScanlineVFX\Local Settings\Application Data\Thinkbox\Deadline6\slave\LAPRO0321\plugins\Nuke.py
0: An exception occurred: Fatal error in StartJob: plugin script “C:\Documents and Settings\ScanlineVFX\Local Settings\Application Data\Thinkbox\Deadline6\slave\LAPRO0321\plugins\Nuke.py”: Python Exception: ImportError : No module named scanline.Paths (Python.Runtime.PythonException)
Type: <type ‘exceptions.ImportError’>
Value: No module named scanline.Paths

Hey Laszlo,

I couldn’t reproduce this here. One check I did was to print out the sys.path in my plugin, and I confirmed that the path I added in my sitecustomize.py file was there. Can you run that check on your end?

Cheers,

  • Ryan

Its a bit odd, the errors seem to be random… also, on some machines some of the libraries load but some dont… :\

ill try to do a sys.path check

We have put in some log prints to figure this out, and get the following when it happens:

Original sys.path: [‘C:\Program Files\Thinkbox\Deadline6\bin\python26.zip’, ‘C:\Program Files\Thinkbox\Deadline6\bin\DLLs’, ‘C:\Program Files\Thinkbox\Deadline6\bin\lib’, ‘C:\Program Files\Thinkbox\Deadline6\bin\lib\plat-win’, ‘C:\Program Files\Thinkbox\Deadline6\bin\lib\lib-tk’, ‘C:\Program Files\Thinkbox\Deadline6\bin’, ‘C:\Program Files\Thinkbox\Deadline6\bin\lib\site-packages’, ‘C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\’, u’C:\Program Files\Thinkbox\Deadline6\bin\Dlls’, u’C:\Program Files\Thinkbox\Deadline6\bin\UI’, ‘//s2/exchange/software/managed/pythonScripts/site-packages’]
Traceback (most recent call last):
File “none”, line 19, in
ImportError: No module named scanline.Paths

The bolded central location has the scanline and scanline.Paths modules in it. Also, if i remote into the machine, and start dpython in deadline/bin, i can import scanline.Paths just fine… very odd

Very odd indeed… could it be the case where a node is unable to see the modules in that network time for a brief period? That could explain the randomness…

It could be, the thing is, that S2 server is our central plugin repository, so if it cant load the python files, it would also have to fail on loading all plugins and max in general,… (there are pre startup syncs that would also fail)

Privacy | Site terms | Cookie preferences