when using the sg_nuke_quickreview app, an artist was getting an error, or rather, they were getting nothing.
Looking into the issue, when they were typing the episode number, they would get a list of shots for that episode. Went hey would select a shot, nothing would happen. The shot field would be blank.
Turns out, when checking what context was returned for all shots in this particular episode, none of them return a “name” field in the entity context.
I ran a tank shell, and created context for a shot in that episode, and the same thing happens; no “name” field.
Good context:
<Sgtk Context: Project: {'type': 'Project', 'id': 485, 'name': 'sweetshow'}
Entity: {'type': 'Shot', 'id': 2929, 'name': '106_030_005'}
Step: None
Task: None
User: None
SG URL: https://awesomeness.shotgrid.autodesk.com/detail/Shot/2929
Additional Entities: []
Source Entity: {'type': 'Shot', 'id': 2929, 'name': '106_030_005'}>
bad context:
<Sgtk Context: Project: {'type': 'Project', 'id': 485, 'name': 'sweetShow'}
Entity: {'type': 'Shot', 'id': 4052}
Step: None
Task: None
User: None
SG URL: https://awesomeness.shotgrid.autodesk.com/detail/Shot/4052
Additional Entities: []
Source Entity: {'type': 'Shot', 'id': 4052}>
I haven’t come across this before. What field is missing that I need to update?
Thanks in advance for any and all help.
-ctj
Have the folders for those shots been created and registered in toolkit?
@Ricardo_Musch , thank you for the quick response. I was about to say, “But of course they ha…oh…” The folders are on disk, but they are not showing up when running tk.paths_from_entity("Shot", shot_id)
. I’m guessing the folders were created by one script, but then the script either crashed, or ??? and did not register the folders with SG. How do I register existing folders with SG? ( still have my SG waterwings…)
You need a tk instance and context and then run tk.create_filesystem_structure
Look it up in the tk-core docs.
Thank you. I was reading through the tk.core docs. I tried running tk.preview_filesystem_structure("Shot", shot_id, engine=None)
to see what will be created and I get an error:
tank.errors.TankError: Missing required script user in config '/ParkCounty/apps/lnx-exo/shotgrid/configs/myshow/config/core/shotgun.yml'
Why would I get this error, when I can run the above queries without issue? Do I need to use sgtk.set_authenticated_user()
, or is there another issue I’m not finding the solution for?
I do read the docs, but I have a lot of questions.
-ctj
Never mind. For those watching at home, the issue is for some methods, you need authentication. Here’s a link to where that doc is (scroll down to ‘non-user facing scripts’:
https://help.autodesk.com/view/SGDEV/ENU/?guid=SGD_qa_developing_qa_sgtk_script_authentication_html