AWS Thinkbox Discussion Forums

Cinema4D R2023.2 submission error

Hello!
I know R2023 doesn’t have the official support, but for some time modifying .param file worked fine.

Todays 2023.2 release seems to have had some API change or due to Python version upgrade, there are errors popping up
When the “Use Take Frame Range” mode is enabled in Submission window and
clicking Submit button, submission doesn’t happen and this error shows in the C4D Console:

Traceback (most recent call last):
  File "C:\DeadlineRepository10/submission/Cinema4D/Main\SubmitC4DToDeadline.py", line 2939, in Command
if not self.SubmitJob():
  File "C:\DeadlineRepository10/submission/Cinema4D/Main\SubmitC4DToDeadline.py", line 2052, in SubmitJob
startFrame = renderData.GetTime( c4d.RDATA_FRAMEFROM ).GetFrame( framesPerSecond )
TypeError:'float' object cannot be interpreted as an integer

Just throwing this here in case someone trys to fix this or someone from Thinkbox can provide unofficial update to SubmitC4DToDeadline.py

1 Like

+1 on getting this resolved please.

EDIT: Looks like Toms already did, nevermind. :slight_smile:
EDIT2: Or may be not…

1 Like

It looks this this would only happen if you had a decimal framerate, like 23.75fps where 24fps would have no issues.

Unless 2023.2 now has fractional frames? I’m not seeing anything in the release notes to suggest that.

Attached is a copy of SubmitC4DToDeadline.py that forces the framerate to be an integer when calculating the start and end frames.
SubmitC4DToDeadline.py (197.7 KB)

All I’ve done is force the variable to an integer like this:

startFrame = renderData.GetTime( c4d.RDATA_FRAMEFROM ).GetFrame(int(framesPerSecond) )#jusbla casting fps to int

It’s untested and I think there’s a chance that number rounding will cause a frame and the beginning or end of tasks will be missed. So please do make a backup of the existing C:\DeadlineRepository10/submission/Cinema4D/Main\SubmitC4DToDeadline.py file before you use this one.

Let me know how it goes, and pay close attention to the tasks’ frame ranges. :slight_smile:

3 Likes

Yeah that’s just what I already did as quick fix.
This fix seems to be working for now, thanks for confirming that this is the way :smiley:

The frame rates I use in C4D already are integer values, not decimal ones, so it looks like something in the API has changed and is triggering some of the data to be converted into the float values.
Also the Python version was bumped up, so maybe also something with that.
Just guessing, I’m total Python noob :slight_smile:

1 Like

Sweet! It’s possible the frame rates are getting represented as 24.0 versus 24?

No matter, this’ll work as a patch for now.

If anyone using this has issues please let us know either here on at awsthinkbox.zendesk.com. :smiley:

1 Like

Hey Guys,

Whats the trick to get deadline working with r2023? Thanks!

-kevin

Hello @lazydude

Follow here:

I did some digging around and it seems like it’s the c4d.BaseTime object that’s the results of renderData.GetTime( c4d.RDATA_FRAMEFROM ) that’s throwing the error so the fix that @Justin_B suggested with

startFrame = renderData.GetTime( c4d.RDATA_FRAMEFROM ).GetFrame(int(framesPerSecond) )#jusbla casting fps to int

would work.

In Maxon’s documentation c4d.BaseTime — Cinema 4D SDK 2023.2.0 documentation
and for 2023.1 and 2024.2 documentation the function GetFrame says it only accepts integers. However, when I run the code to get the framerate from the scene it’s always passing a float value so it’s probably just something that was changed from 2023.1 to 2023.2.

It does seem like the issue was addressed by 2024.2 as when I tested submitting to deadline in that version and the submission worked just fine.

If you want a more robust solution which supports fractional frame rates I was getting the results using

startFrame = int(renderData.GetTime( c4d.RDATA_FRAMEFROM ).Get()*framesPerSecond)
endFrame = int(renderData.GetTime( c4d.RDATA_FRAMETO ).Get()*framesPerSecond)

In Cinema 4D 2024.3.2 I still get this error, when selecting “use framerange from take” in the Deadline submitter.
TypeError:‘float’ object cannot be interpreted as an integer deadline cinema 4d

Is there a patch for this?

Privacy | Site terms | Cookie preferences