AWS Thinkbox Discussion Forums

Deadline 10.1.16.6 Nuke submitter error

Hi, with last deadline 10.1.16.6, we got an error when trying to submit nuke job from nuke Submitter

Traceback (most recent call last):
File “C:/Users/marca/.nuke\DeadlineNukeClient.py”, line 91, in main
import SubmitNukeToDeadline
File “C:/Users/marca/AppData/Local/Thinkbox/Deadline10/cache/n3Y3rEO5lKjd3Y9ZnmoVAitZIE/submission/Nuke/Main\SubmitNukeToDeadline.py”, line 7, in
import re.Match as Match
ModuleNotFoundError: No module named ‘re.Match’; ‘re’ is not a package
The SubmitNukeToDeadline.py failed with the following error message. Please make sure that the Deadline Client has been installed on this machine, that the Deadline Client bin folder is set in the DEADLINE_PATH environment variable, and that the Deadline Client has been configured to point to a valid Repository.
Traceback (most recent call last):
File “C:/Users/marca/.nuke\DeadlineNukeClient.py”, line 91, in main
import SubmitNukeToDeadline
File “C:/Users/marca/AppData/Local/Thinkbox/Deadline10/cache/n3Y3rEO5lKjd3Y9ZnmoVAitZIE/submission/Nuke/Main\SubmitNukeToDeadline.py”, line 7, in
import re.Match as Match
ModuleNotFoundError: No module named ‘re.Match’; ‘re’ is not a package

Ok here a modifcation i done, , so far it look working in nuke 13 and 12.2
If you want to see modification search for #Modif (there is 2 modifications)

the file remplace the one in /submission/nuke/main

SubmitNukeToDeadline.py (130.2 KB)

4 Likes

The import is wrong indeed, re.Match is a class, not a module. So from re import Match is correct (no point to alias it to Match again, since it is already called that), but not import re.Match.

Searching through the code, this class is only used for type annotations, not actual logic.
You don’t normally instantiate Match, but work through the utility functions provided by re.

Actually,
except: pass
is pointless here, because it leads to your code failing later, instead of earlier (unless you have some weird logic where the import might be empty, which I’d discourage).
This submitter is quite the mess.

except: pass → that’s to make it work on nuke 12.2 , else it will fail on it, if we keep the re.Match registred .
:slight_smile:

Ah I see now, re.Match is not available in Python 2.7. And it is needed only for type annotations so it would not matter anyway.
Sure, for a quick hack this works.

it’s nothing more than a quick hack, i just correct errors i receive…
No time to do it the clean way :slight_smile:

Yeah sure, I don’t mind :slight_smile:
It’s a pity such fixes are not distributed differently, e.g. through a git repo somewhere.

Thank you @MarcoA , I hit exactly this issue straight away and your solution fixed it.

I also had issues with the integrated submitter, as the .nuke folder was full of nuke12 references I renamed it, ran the installer but it fails to create a .nuke folder if it can’t find it.

1 Like

youmean like in the deadline upload section of this forum, like they done for 3dsMAX 2022?

Oh, I did not know of that section, thanks for pointing it out! (by the way it seems a few topics there are miscategorized)
Still, git would be preferable - if I have a customized plugin, I’d like to check and merge the changes in a controlled manner without having to deal with diffing, etc.

I’m getting issues with this update affecting other modules in Python. When I load this into Nuke 12.2 the following section:

try:
    from typing import Any, List, Optional, Tuple, Union
except ImportError:
    pass

Cause xmltodict to fail with a maximum recursion error. I’ve commented it out for now, but not sure if this causes further issues?

Don’t know how these modules are used, but interestingly I started getting errors for the same module when using pip on Python 2.7.

Privacy | Site terms | Cookie preferences