ID 565537 - A TypeError occurs when using the spreadsheet_csv_export Python example for Nuke Studio/Hiero

Follow

Problem summary:
A TypeError occurs when using the spreadsheet_csv_export Python example for Nuke Studio/Hiero
 
Customer reported version:
Nuke Studio N/A
 
Customer reported platform:
N/A
 
Steps to reproduce:
1) Download the spreadsheet_csv_export.py example from the Hiero Python Developer Guide.
2) Place this file in the ~/.nuke/Python/Startup directory, and launch Nuke Studio.
3) Create a Sequence with at least one Clip, and open the Spreadsheet View.
4) Right-click in the Spreadsheet View window, and select the Export... > Spreadsheet to CSV option.
5) Select a destination of your choice, and observe the errors printed to the Terminal: TypeError: 'float' object cannot be interpreted as an integer and OverflowError


 
Expected behavior:
The example code should export a CSV file from the Spreadsheet View without error.
 
Actual behavior:
When using the spreadsheet_csv_export.py file in Nuke Studio/Hiero 15, a TypeError and OverflowError prevent the CSV file from generating correctly.
 
Workaround:
Inside the spreadsheet_csv_export.py file, replace the getSrcIn() and getSrcOut() functions with the following:

def getSrcIn(trackItem):  fps = trackItem.parent().parent().framerate()  clip = trackItem.source()  clipstartTimeCode = clip.timecodeStart()  #convert float to int  srcIn = hiero.core.Timecode.timeToString(int(clipstartTimeCode+trackItem.sourceIn()), fps, hiero.core.Timecode.kDisplayTimecode)  return srcIndef getSrcOut(trackItem):  fps = trackItem.parent().parent().framerate()  clip = trackItem.source()  clipstartTimeCode = clip.timecodeStart()  #convert float to int  srcOut = hiero.core.Timecode.timeToString(int(clipstartTimeCode+trackItem.sourceOut()+timecodePrefCheck()), fps, hiero.core.Timecode.kDisplayTimecode)  return srcOut
 
Reproduced by Support in:
Nuke 15.0v3 - Windows 11, macOS 13 Ventura
Nuke 15.0v2 - Windows 11
Nuke 15.0v1 - Windows 11 - Regression
 
Unable to reproduce bug in:
Nuke 14.1v3 - Windows 11
 
Earliest version tested:
Nuke 14.1v3 - This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why