Clarisse 5, py3.7 submit not working

Guys im getting an error submitting a job from clarisse, any plans for updating the submission script?
Error:
Traceback (most recent call last):
File “”, line 54, in
TypeError: a bytes-like object is required, not ‘str’
i was able to make a fix for this state of submission, but then i have run into another problem

Solution: (DeadlineClarisseClient.py)
path = GetRepositoryPath( “submission/Clarisse/Main” ).decode(‘utf-8’)
path = path.strip()

after i been asked do i want to export scene as archive so i can render with Crender, and saying YES/NO, i get this error

Traceback (most recent call last):
File “”, line 66, in
File “//computer/DeadlineRepository10/submission/Clarisse/Main\SubmitClarisseToDeadline.py”, line 107, in SubmitToDeadline
CallDeadlineCommand( [ “-ExecuteScript”, scriptPath, projectPath, frameList, main_version, repr( renderableImages ) ], False )
File “//computer/DeadlineRepository10/submission/Clarisse/Main\SubmitClarisseToDeadline.py”, line 49, in CallDeadlineCommand
proc = subprocess.Popen(arguments, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, creationflags=creationflags)
File “C:\Users\bazuka\AppData\Local\Programs\Python\Python37\Lib\subprocess.py”, line 800, in init
restore_signals, start_new_session)
File “C:\Users\bazuka\AppData\Local\Programs\Python\Python37\Lib\subprocess.py”, line 1148, in _execute_child
args = list2cmdline(args)
File “C:\Users\bazuka\AppData\Local\Programs\Python\Python37\Lib\subprocess.py”, line 555, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: a bytes-like object is required, not ‘str’

sooo, any solution for this one?

This has been coming up multiple times lately.
All calls to Popen et al should specify an encoding argument in order to work with strings. Not doing it, by default Py3 subprocess uses byte strings.

understood, but are there workarounds?

p.s. small update, i was able to find a workaround for all the errors but the job is not showing up in monitor???

Bobo any clues?

Yes, the workaround is in CallDeadlineCommand to pass encoding to Popen.

i did everything, but like i said the job is not being submitted, and i know that the last line in the py is executed

CallDeadlineCommand( [ “-ExecuteScript”, scriptPath, projectPath, frameList, main_version, repr( renderableImages ) ], False )

but :frowning:

mate can you gimme some more info related to Popen, i got stuck

thx

In Python 3 by default subprocesses take their arguments (and return their result) as byte strings.
If you pass encoding="utf-8" to Popen, it will work with “regular” strings instead.
This needs to be fixed in CallDeadlineCommand function.

i’ve added utf8 but getting an error

AttributeError: ‘list’ object has no attribute ‘encode’

would be great if you can show me, exactly the place where it should be encoded

thx

from what i was able to figure it out was that, only if the string is in this format it will work, anything else wont work

deadlinecommand.exe -ExecuteScript //computer/DeadlineRepository10/scripts/Submission/ClarisseSubmission.py P:/project/something.project 1-360 5 [‘build://project/render/image’]

i give up, when they decide to make something thats working let me know…