GNOME Bugzilla – Bug 706768
[pitivi] Allow using GES Project's save function with no timeline object
Last modified: 2018-05-07 14:20:52 UTC
Here's a fun usecase in Pitivi. You need one valid xges project and one invalid one. To generate the invalid one, just 'echo "nope.png" > fake-project.xges'. 1. Load the valid xges project in Pitivi 2. Try loading fake-project.xges 3. Wait ~10 seconds Result: in addition to the (normal) error dialog that says that the project you're trying to load is invalid... you will eventually get a *second* error dialog that is quite a bit more cryptic: > Unable to save project "fake-project.xges~" > Argument 1 does not allow None as a value The ~ at the end indicates that this is actually caused by the automated backup feature trying to save... so here's where this happens: inside the saveProject method in pitivi's project.py, if we print the various values at that point in time: > print "backup is:", backup > print "\turi is:", uri > print "\tcurrent is:", self.current > print "\tcurrent uri is:", self.current.uri > print "\tcurrent timeline is:", self.current.timeline ...we get: > backup is: True > uri is: [...] fake-project.xges~ > current is: <Project object at 0x2e1fa00> > current uri is: [...] fake-project.xges > current timeline is: None And so, the reason why we get the cryptic "Argument 1 does not allow None as a value" error when trying to do "self.current.save(self.current.timeline, uri, formatter_type, overwrite)" ...is, as far as I can tell, because self.current.timeline is None. I think it's considered argument #1 because argument #0 would be the instance of GES Project that is implicitly passed by Python? So. In the end, my understanding is that GES Project's "save" method does not allow saving a project that has no timeline instance at all. While I *could* put something like: if backup and self.current.timeline is None: return ...that does feel like a horrible, dirty hack. So I'd like to avoid that if possible. > <Mathieu_Du> Yes, you should not [have to] do that I believe. Just let the code as it is and open an issue we'll have a look at it in due time
Created attachment 253077 [details] screencast
To me it makes not sense to save a project without a timeline, a project can be save if the timeline is empty, but not with no timeline at all.
What is up with that issue?
What's up is that nothing happened in 5 years. Closing for lack of info/context. Re-open after discussion with GES maintainers maybe ?