AWS Thinkbox Discussion Forums

Nuke submission TypeError: expecting a string or number, unicode found

Hi there,
We’ve just updated our deadline repo. (version info below)

I’ve updated the nuke submitter script to the one included in the repo but I’m getting the following error when submitting to deadline.

Traceback (most recent call last):
File “z:/studio/nuke/release/v1.0.3/Repository/_AutoInstaller/deadline\DeadlineNukeClient.py”, line 52, in main
SubmitNukeToDeadline.SubmitToDeadline( )
File “//path_to/studio/dr10/custom/submission/Nuke/Main\SubmitNukeToDeadline.py”, line 2098, in SubmitToDeadline
dialog.pool.setValue( DeadlineGlobals.initPool )
TypeError: expecting a string or number, unicode found

I know I can fix this by encoding the strings prior to getting the values, but as that’s a pretty major ‘fix’ to implement, I’m wondering why this is happening at all.
I’m submitting from a clean nukescript so there’s no legacy deadline data in nuke.root()… but perhaps I’ve missed something.

Any idea what I’ve done in my config to break Deadline?

Thanks
p.

Version Info

Nuke 11.1v6
Windows 10
Deadline Launcher 10.0

An application that provides a means of remote communication between the Deadline Monitor and the Deadline Slave / Pulse applications.

Deadline Client Version: 10.0.25.2 Release (b262943da)
FranticX Client Version: 2.4.0.0 Release (9beef8dc3)

License Mode: Standard
License Server: @licserver

Repository Version: 10.0.25.2 (b262943da)
Integration Version: 10.0.25.2 (b262943da)
3PL Settings Version: 16/04/2019

All fixed. My sticky settings must have been corrupted.

Actually, this is still a problem.
If I delete my sticksettings, I can submit.
If I restart nuke, on submission I’m getting the unicode errors again.

It appears configParser is returning unicode values by default and nuke knobs can’t be set to unicode values.
Is there any way to override this behaviour without having to edit every config.read value in the submitNukeToDeadline.py file?

What I don’t understand is that this is the behaviour as supplied by deadline… and I assume it should work, but for some reason its not working for me. What might it be about my environment that might be causing this issue?

Thanks again.
p.

Did you get a fix for this? I’ve just started getting the same error

Looks to be an issue with how we are setting render globals in DeadlineRepository10/submission/Nuke/Main/SubmitNukeToDeadline.py.

​Root cause was that python 3 configparser would sometimes be loaded in, and there were no checks for Unicode text (which would cause the error). Instead the python 2 parser has to be loaded in by default, if available (instead of the python 3 parser) and when setting values for nuke Unicode strings are encoded as utf-8

​Resolution is to Upgrade to 10.1.x.x. If that’s not possible, workaround the problem by forcing strings in the submission script when parsing the nuke submission settings config file (nuke_py_submission.ini)
I think the following should work:

  1. Exit Nuke
  2. Make a backup copy of DeadlineRepository10/submission/Nuke/Main/SubmitNukeToDeadline.py (e.g, copy it to DeadlineRepository10/submission/Nuke/Main/SubmitNukeToDeadline.py.bak)
  3. Open “DeadlineRepository10/submission/Nuke/Main\SubmitNukeToDeadline.py” using a text editor, and change the global value entry (you see in the error):
    dialog.renderMode.setValue( DeadlineGlobals.initPool ) 

To:

    dialog.renderMode.setValue( str( DeadlineGlobals.initPool ) ) 
  1. Save the file
  2. Restart Nuke and open the Deadline Submission dialog again.

Thanks
Karpreet

Old thread, but I got the same error message as the OP.

My solution was to replace the lines :

try:
    import configparser # Python 3
except:
    import ConfigParser as configparser # Python 2

With :

if sys.version_info.major == 3:
    import configparser # Python 3
if sys.version_info.major == 2:
    import ConfigParser as configparser # Python 2
Privacy | Site terms | Cookie preferences