Nuke error Unknown switch: -r

Collagene
Posts: 2
Joined: Thu Dec 13, 2018 11:26 am

Nuke error Unknown switch: -r

Post by Collagene »

Gday.

We are trying submit nuke scripts with centos7 and w10 Through render selected panel inside Nuke but we got this output error message :

Starting CGRU Nuke add-ons from: /opt/cgru/plugins/nuke Unknown switch: -r C:cgru.2.2.3pluginsnukerender.py : No such file or directory Exception IOError: (2, 'No such file or directory', 'C:cgru.2.2.3pluginsnukerender.py') in <module 'threading' from '/usr/local/Nuke11.2v4/lib/python2.7/threading.py'> ignored

we use this great dispatcher daily with maya scenes smoothly whit different OS by Afanasy Starter windows .
Here our config json config file

{"cgru_config":{
"":"This is a CGRU default config file",
"":"Describe your own configuration in 'config.json', it will be included last",
"":"To disable property you can just prefix it with '-'",

"include":["afanasy/config_default.json","config.json"],

"":"'OS_unix': Any UNIX (Linux, MacOSX) specific settings",
"":"'OS_windows': MS Windows specific settings",
"":"'OS_linux': Linix specific settings",
"":"'OS_macosx': MacOSX specific settings",

"":"Digest authentication realm",
"realm":"CGRU",

"":"To open location/shot in RULES:",
"-rules_url":"http://localhost/cgru/#/",
"":"By default it is disabled",

"projects_root":["/mnt/prj/","/projects/","/cgru/rules_root/"],

"nuke_filenamefilter":true,

"open_folder_cmd":"open \"@PATH@\"",

"previewcmds":[
"Nuke|nuke -v \"@ARG@\"",
"Mplay|mplay \"@ARG@\"",
"Mplay *|mplay `dirname \"@ARG@\"`/*",
"DJV|djv_view \"@ARG@\"",
"IMDisplay|display \"@ARG@\"",
"XTerm Folder|cd `dirname @ARG@` && xterm"
],
"annotations":[
"APPROVED",
"FAILED"
],

"docs_url":"http://cgru.info",
"forum_url":"http://forum.cgru.info",

"":"Configure SMTP server to send emails from",
"email_smtp_server":"localhost",
"":"You can keep 'localhost', but configure machines with RULES server",
"":" and Afanasy 'events' service to have such service running",

"":"This command provided with CGRU and uses utilities/emailsend.py Python script",
"email_send_cmd":"emailsend",

"email_sender_address_host":"cgru.info",

"keeper_port":50999,
"keeper_port_https":50443,

"timeformat":"%a %d %b %H:%M.%S",
"":"'strftime' function format http://www.cplusplus.com/reference/clib ... e/strftime",

"filenamesizemax":250,

"platforms":["linux","mac","windows"],

"OS_unix":{
"cmd_shell":"/bin/sh -c"
},
"OS_windows":{
"open_folder_cmd":"explorer \"@PATH@\"",
"cmd_shell":"cmd.exe /c",

"":"This is a paths map example (disabled)",
"":"Client:Server",
"pathsmap":[
["X:/","/mnt/nas/"],
],
"":"Client slashes direction plays no role, as it tries both slashes when searchs a path to replace.",
"":"But will replace with specified slashes, if unix slashes not forced (for Nuke, for example)."
},
"OS_linux":{
"open_folder_cmd":"nautilus \"@PATH@\"",
"pathsmap":[
["/mnt/nas/","X:/"],
]
},

"pswd_visor":"1832116180fdc61b64fd978401e462e9",
"pswd_god":"73bcaaa458bff0d27989ed331b68b64d",

"":""
}}

Do you have any advice for fixing the Nuke issue.
Thank u in advance.
Band tm
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Nuke error Unknown switch: -r

Post by timurhai »

Hi.

You should keep in you config.json only modified parameters. This way is simple to detect/maintain changes.

When and where that message appears?
Just after "Render Selected..." menu item hit?
Just after "Ok" button pressed in "Render Selected" dialog?
This is an error task output?

Singe message contains and Linux and Windows paths, may be there is some paths mess?

btw
This topic should be in "Nuke" section.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Collagene
Posts: 2
Joined: Thu Dec 13, 2018 11:26 am

Re: Nuke error Unknown switch: -r

Post by Collagene »

Thank you for the quick reply.

this message appears in the listen job tab of the web monitor. There is no error after "Render Selected..." menu item hit, only during render.


The full message is :
"
frame 51[boxx4-pc.band]:
HOSTNAME=boxx4-pc.band
LM_LICENCS_FILE='/usr/local/Nuke11.2v4/nuke.lic'
NUKE = '/usr/local/Nuke11.2v4/Nuke11.2'
Nuke 11.2v4, 64 bit, built Oct 9 2018.
Copyright (c) 2018 The Foundry Visionmongers Ltd. All Rights Reserved.
Starting CGRU Nuke add-ons from:
/opt/cgru/plugins/nuke
CGRU filenameFilter added:
Unknown switch: -r
Traceback (most recent call last):
File "/usr/local/Nuke11.2v4/plugins/nuke/callbacks.py", line 421, in filenameFilter
s = f[0](filename,*f[1],**f[2])
File "/opt/cgru/plugins/nuke/scripts/cgru/pathmap.py", line 34, in pmFilenameFilter
filename = PMaps[key].toClient(filename)
UnboundLocalError: local variable 'key' referenced before assignment
Traceback (most recent call last):
File "/usr/local/Nuke11.2v4/plugins/nuke/callbacks.py", line 421, in filenameFilter
s = f[0](filename,*f[1],**f[2])
File "/opt/cgru/plugins/nuke/scripts/cgru/pathmap.py", line 34, in pmFilenameFilter
filename = PMaps[key].toClient(filename)
UnboundLocalError: local variable 'key' referenced before assignment
"

thanks
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Nuke error Unknown switch: -r

Post by timurhai »

This was some testing feature some time, i did not heard that somebody used it.
You are really need this feature?
This feature worked with previous Nuke or(and) CGRU versions?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Nuke error Unknown switch: -r

Post by timurhai »

Anyway, you can disable that feature anytime.
Remove this line from you config.json:

Code: Select all

"nuke_filenamefilter":true,
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: Nuke error Unknown switch: -r

Post by mateusz@autonomy.pl »

I have similiar problem with cgru 2.3.0,
rendering task on linux which come from windows gives error :
"(Starting CGRU Nuke add-ons from:
/opt/cgru/plugins/nuke
C:cgru-windowspluginsnukerender.py : Nie ma takiego pliku ani katalogu
Exception IOError: (2, 'Nie ma takiego pliku ani katalogu', 'C:cgru-windowspluginsnukerender.py') in ignored)"

But i dont have ""nuke_filenamefilter":true," in my config.json...
any advice?
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Nuke error Unknown switch: -r

Post by timurhai »

Hi.
Can you show task command on (for) Linux?
It seems that paths from windows to Linux not mapped.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: Nuke error Unknown switch: -r

Post by mateusz@autonomy.pl »

thats how command lookslike
"frame 1105939-1105948
nuke[nuke]:1000 frames(1105939,1105948,10):
Command:
nuke -i -t C:\cgru-windows\plugins\nuke\render.py -X Write1 -F1105939-1105948x1 -x "P:\P96_BNP-paribas-TOPVIEW\CG\COMP\NUKE\disabled_pakiet.nk.0327-151837-209.disabled_pakiet.nk-afanasy.nk""


also task submited on linux to windws error looks like

"Starting CGRU Nuke add-ons from:
C:\cgru-windows\plugins\nuke
/opt/cgru/plugins/nuke/render.py : No such file or directory
Exception IOError: (2, 'No such file or directory', '/opt/cgru/plugins/nuke/render.py') in <module 'threading' from 'C:\Program Files\Nuke11.1v1\lib\threading.py'> ignored"
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Nuke error Unknown switch: -r

Post by timurhai »

This command can not be executed on Linux:

Code: Select all

nuke -i -t C:\cgru-windows\plugins\nuke\render.py -X Write1 -F1105939-1105948x1 -x "P:\P96_BNP-paribas-TOPVIEW\CG\COMP\NUKE\disabled_pakiet.nk.0327-151837-209.disabled_pakiet.nk-afanasy.nk"
May be this is command for windows, not for Linux?

To get command for Linux, you can open afwatch on Linux and get task command there.

Have you configured your paths map to use mixed OS rendering?
http://cgru.info/afanasy/render#paths_map
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
mateusz@autonomy.pl
Posts: 16
Joined: Fri Jan 11, 2019 2:43 pm

Re: Nuke error Unknown switch: -r

Post by mateusz@autonomy.pl »

yes i have configured pathmap.
For blender it works fine, commands are converted to linux paths, but for nuke its not working at all. command look same on windows and linux machine...
this is config.json:"
{"cgru_config":{


"nuke_filenamefilter":false,
"af_servername":"192.168.1.210",
"platforms":["linux","mac","windows"],


"OS_windows":{
"open_folder_cmd":"explorer \"@PATH@\"",
"cmd_shell":"cmd.exe /c",
"pathsmap":[
["P:/", "//mnt/STORAGE/"]
]}

}}
"
Post Reply