AWS Thinkbox Discussion Forums

Pre script error on second machine

Hi everyone,

I have a custom pre-script that involves doing some file checks, and an api call using the requests library.

It works fine on my main machine, but when I try to run the same task on a second machine, I am getting this error.

It seems it’s trying to import a package that is meant for python 2 in python 3, I am not sure how I can fix this, any one have some advice as it’s been eating up my nerves.

Error
=======================================================
Pre job script "Z:/01_Production_CCM/blender/Blender 4.2/4.2/scripts/addons_core/zs_stable_diffusion_connection/zs_ai_pre_3d_render_script.py": ImportError : This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted. (FranticX.Scripting.PythonNetException)
  File "Z:/01_Production_CCM/blender/Blender 4.2/4.2/scripts/addons_core/zs_stable_diffusion_connection/zs_ai_pre_3d_render_script.py", line 22, in <module>
    spec.loader.exec_module(requests)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "Z:/01_Production_CCM/python/venv/Lib/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\__init__.py", line 7, in <module>
    from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\connectionpool.py", line 11, in <module>
    from .exceptions import (
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\exceptions.py", line 2, in <module>
    from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\packages\six.py", line 199, in load_module
    mod = mod._resolve()
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\packages\six.py", line 113, in _resolve
    return _import_module(self.mod)
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\urllib3\packages\six.py", line 82, in _import_module
    __import__(name)
  File "C:\Users\luye\AppData\Local\Thinkbox\Deadline10\pythonAPIs\CSBAA0VGN3AuwCL6e5Iz4Q==\http\__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
   at Python.Runtime.Runtime.CheckExceptionOccurred()
   at Python.Runtime.PythonEngine.ModuleFromString(String name, String code, String fileName)
   at FranticX.Scripting.PythonNetScriptEngine.ExecuteFile(String scriptFile, String moduleName, Boolean optimizeCode)
   at Deadline.Plugins.PluginWrapper.RenderScript(String scriptFilename, Boolean preJobScript, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bfi, CancellationToken bfj)
   at Deadline.Plugins.SandboxedPlugin.RenderScript(String scriptFilename, Boolean preJobScript, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajm, CancellationToken ajn)

Do you need to clear out the old pythonAPI’s folder that are cached, or is it the script that needs updating?

I’d try clearing the folder first (or renaming it)

if you think it’s the script there’s a good blog post about updating here

Privacy | Site terms | Cookie preferences