tdu.Timecode debugging to the textport

Hi Guys,

If there is an error with tdu.Timecode it seems to be debugging the error to the console rather than throwing an error onto the OP it’s attached to.

Attached is a very basic example of this where I have a parameter with a deliberately broken timecode object and if you open up the textport you’ll see it’s just logging the errors to there:

:1: tdWarning: Invalid format. Timecode String format should be of the form hh:mm:ss:ff or hh:mm:ss.ff
:1: tdWarning: Invalid format. Timecode String format should be of the form hh:mm:ss:ff or hh:mm:ss.ff

This can get quite spammy if it’s doing a check every frame.
base_timecode_issue.tox (342 Bytes)

This seems to be a general issue with python warnings as a whole – they all are currently only output to the textport and not the node itself. We’ll look into this.

Now, maybe in this case it would be more helpful for it to throw an error (rather than a warning and initialized to 00:00:00:00). An invalid format on timecode creation points to a problem somewhere that needs to be fixed so it could be preferred to have that more visible and not so easily ignored or missed.

Yeah if it could throw an error then at least we could catch it with something like

try:
	test = tdu.Timecode('broken')
except:
	debug('we didnt set a valid timecode')

Right now theres no way to catch it as theres no error.

The warnings will be properly assigned to the corresponding node in the next release. Thanks for the report.