- Jun 10, 2017
- 11,017
- 16,307
Not necessarily, because it's the kind of issue that can be really tricky due to pythoners weird mind.But I suppose Ren'Py should handle that anyway?
The
You must be registered to see the links
approach lead to simpler code, but also code way more complex to debug. You'll know about the error when it's triggered, not when it effectively happen. And this especially apply for this kind of error.Imagine that you've something like this :
Python:
define someObject = SomeClass( "abcd" )
[a lot of code and labels]
label whatever:
$ name = someObject.fullName()
And the only way to find this is to manually trace back not the process, like the traceback is doing, but the code of the class to see where the value is changed and defined, then to search where the parameter have been set.
Now, imagine that you create the object dynamically, there by passing a variable instead of a literal value like in my example, and you'll have to investigate even deeper to find where the said variable is defined.
So, in this case, it can also be an incompatibility between two third party modules, and totally not related to Ren'Py. It's Ren'Py that use the modules, and Ren'Py that catch the error, hence all the references in the traceback, but everything in fact happen outside of it.
I agree on this. Since the whole issue is to know the duration, therefore to get an information available in the file headers, a module that limits to the interpretation of the said headers is enough.Import errors aside,moviepy
seems like a heavy solution just to get the video duration. Think I would look atYou must be registered to see the linksif I needed it for a project.
Ideally I would even advice on many small modules ; each one caring about the headers for one format. This would lead to way simpler 100% Python code, and therefore have a bigger OS compatibility value. But once again it's not really an approach that match Python's spirit.