Hi,
I am having some issues with a post-job python script. We are using Deadline 4.0 and Python 3.1. The issue is that IronPython is having difficulty using standard Python libraries. We’d like to keep our current Python scripts/modules and not rewrite them for Deadline/IronPython/.net, if that can be avoided.
Initially, I got this error: Error executing post job script: Python Error: No module named os (IronPython.Runtime.Exceptions.ImportException)
I tried adding “C:\Python31\Lib” to the IronPython search path in the repository options, but this didn’t have any effect.
I then tried this solution, which I found on the forums: import sys
sys.path.append( “C:\Python31\Lib” )
This worked to a certain extent, being that I no longer get the error about finding the “os” module. However, now I get this error: Error executing post job script: Python Syntax Error: unexpected token ‘o777’ (Microsoft.Scripting.SyntaxErrorException)
File: C:\Python31\Lib\os.py
Line: 122
Column: 26
(System.Exception)
Is this a compatibility issue with Python 3.1 specifically? Is there an older version of Python that’s safer to use?
Perhaps it would be useful to have a Deadline list of what modules are not supported by IronPython and hence Deadline scripting somewhere on this forum, to help people save time wondering why their code isn’t working?
Maybe a cross-reference from the IronPython docs?
For example, I discovered this week the “zipfile” module is supported but NOT the “zlib”…!