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
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.
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.
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.
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.