AWS Thinkbox Discussion Forums

Draft upload to shotgun

Hi there,

it seems our “upload to shotgun” functionality is broken.
Could you guide me on how to figure out what happened?
-> Which process/machine is doing the upload in the end, the slave that rendered the job? Want to figure out if i´s a firewall or a deadline issue…

I was also wondering how draft knows which movie to upload if a script generates two outputs (h264 and DNxHD)?

Tiny feature request: could you please make the “upload to shotgun” checkbox in the submitters sticky?
The artists always forget the re-tick it as all the other parameters are remembered from the last submission…

Thanks,

Timor

The machine doing the uploading should be whichever Slave finished the Job (ie, whichever one rendered the last remaining Task). This was changed (in 6.1 I think?) to use the Shotgun event plugin to do the uploading, as opposed to having a dedicated post-job script do it. Which version of Deadline are you guys on?

In terms of how it determines which output to upload, it grabs whichever one is first output path tied to the Draft job. If that path isn’t matching any of the actual output of the Draft templates, that could explain why you’re not seeing the output getting uploaded anymore. When using the event plugin, this has the slightly unfortunate limitation that it assumes the output to have a “.mov” extension. We’re probably going to be looking at a better way to implement that in the future, though.

In terms of making the upload checkbox sticky, that’s definitely something we can do. I need to make some changes to all those submitters in the near future anyways, might as well do it while I’m in there =)

Hope this helped!

Cheers,
Jon

Hi Jon,

thanks for clarifying.

We just upgraded to 6.2.

Deadline/Draft creates a new version, uploads the thumbnail and enters even path to frames and path to movie but fails in uploading the quicktime, so it´s probably not a firewall thing. Is there a way to see a log specifically for the draft jobs?

Thanks
Timor

Since Draft jobs get their own Jobs, the logs should all be under the Draft ones. It should be a separate entry in the Job Reports for the Shotgun Event plugin, which would be doing the uploading. Is there anything showing up in the Job Reports?

Hi Jon,

ok, it seems it cannot find the file it just created (I replaced the path with xxxxx):

[i]=======================================================
Error

Event Error (OnJobFinished): ShotgunError : Path must be a valid file, got ‘V:\xxxxxxxxx_v002.mov’

=======================================================
Type

PythonException

=======================================================
Stack Trace

[’ File “none”, line 276, in OnJobFinished\n’, ’ File “\\dl02\deadlinerepository\events\Shotgun\ShotgunUtils.py”, line 269, in UploadMovieToVersion\n sg.update(‘Version’, versionId, data)\n’, ’ File “\\dl02\deadlinerepository\events\Shotgun\shotgun_api3\shotgun.py”, line 1062, in upload\n thumb_id = self.upload_filmstrip_thumbnail(source_entity[‘type’],\n’]

=======================================================
Full Log

UploadMovieToVersion: V:\xxxxxxxx_v002.mov (1504)
An error occurred in the “OnJobFinished” function in events plugin ‘Shotgun’: ShotgunError : Path must be a valid file, got ‘V:\xxxxxxx_v002.mov’ (Python.Runtime.PythonException)
[’ File “none”, line 276, in OnJobFinished\n’, ’ File “\\dl02\deadlinerepository\events\Shotgun\ShotgunUtils.py”, line 269, in UploadMovieToVersion\n sg.update(‘Version’, versionId, data)\n’, ’ File “\\dl02\deadlinerepository\events\Shotgun\shotgun_api3\shotgun.py”, line 1062, in upload\n thumb_id = self.upload_filmstrip_thumbnail(source_entity[‘type’],\n’] (Deadline.Events.DeadlineEventPluginException)
bei Deadline.Events.DeadlineEventPlugin.HandlePythonError(String message, Exception e)
bei Deadline.Events.DeadlineEventPlugin.OnJobFinished(Job job, String[] auxiliaryFilenames)
bei Deadline.Events.DeadlineEventManager.OnJobsFinished(Job[] jobs, DataController dataController)[/i]

Can you confirm that the file is actually there? Is this a cross-platform issue, maybe? If not, and everything is Windows, does it work if you specify the full UNC path to the file, instead of using mapped drives?

If you check the Draft job’s output in Deadline, does Deadline think the output is present?

Hi Jon,

we found the issue! Thanks for tip to check if deadline is seeing the output which was not the case. The reason was the draft script adding -h264.mov and -DNxHD.mov to the filename, hence deadline not being able to find it.

Would be nice if draft could somehow tell deadline if it modifies an output filename…

Thanks for the support.

Timor

Yeah, that’s been requested before, and I can definitely see that it is a bit of a pain.

I think what we want to do going forward is just put better hooks into Draft to modify specific Job properties, probably through Deadlinecommand. That would allow you to just modify the Draft Job’s output directory/filename properties from the Draft script itself.

+1. The Draft output should be set by the Draft Script. Some Draft scripts would have one output, some would have multiple outputs. We edited our draft scripts to print OUTPUT: “\path\tofile\” and then put a line in the event handler to collect those.

It should be a default part of the Deadline system:

viewtopic.php?f=156&t=11109

        self.AddStdoutHandlerCallback( ".*Output: (.*)" ).HandleCallback += self.HandleStdoutOutput
    def HandleStdoutOutput(self):
        job = self.GetJob()
        RepositoryUtils.UpdateJobOutputFileNames( job, [ self.GetRegexMatch( 1 ) ] )
Privacy | Site terms | Cookie preferences