Hi,
It appears that in the Deadline ROP’s PythonModule, the call to CallDeadlineCommand returns a bytes object, i.e. b’\C:\path\to…’ With Python2.7 this didn’t matter as the leading ‘b’ was ignored. But in PY3, the next statement in the PythonModule is to do a .replace(), which needs an str to work on, not a bytes-like-object. I can convert to a string via .decode(‘UTF-8’), but I suspect this isn’t the only place this will need to be done.
We just upgraded to DL10.1.17.4, so I’ve just started my tracking down of issues, but wondering if I have an old OTL?
This is a Python 3 thing - subprocesses return a byte object.
It is possible to specify an encoding in the call and get back a string.
stdout
Captured stdout from the child process. A bytes sequence, or a string if run() was called with an encoding, errors, or text=True. None if stdout was not captured.
Yes, PY2 treated byte objects as strings whereas PY3 doesn’t. It seems that maybe CallDeadlineCommand’s use of subprocess needs adjustment to return plain strings? Though I’m wondering if/where we have some kind of mismatch as we can’t be the only ones trying this under Houdini 18.5/PY3, so I much more suspect something on our end
We are still to make the transition to Py3 Houdini and Py3 Deadline (done migrating most other areas).
I noticed there are currently errors in the submitter itself, which result from Python 3 incompatibilities. This is probably due to being on older Deadline, though. It has likely been addressed in newer versions.
I suppose you have reinstalled the Deadline client along with the repo upgrade.
You can check the ROP code (the one contained in the node) and see how the subprocess call is implemented. It is not impossible that there is a bug.
It turns out that we were pointing to some older code for the Deadline ROP, so once I updated it, all was good.
Could you go into more detail for people who hit this issue in the future?
For better or worse, we copy the Houdini ROP OTL and /some but not all/ associated files into a folder near our other 3rd-party Houdini plugins (e.g. we skip the MainMenu xml file as we only want DL to be accessed via the ROP OTL). Well, we’d updated DL a few times and hadn’t refreshed those files (the .hda and CallDeadlineCommand.py in particular) so they were getting pretty stale. Then when we started using H18.5/PY3, the staleness made itself apparent! I updated our Houdini DL plugin and all was good.