After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706768 - [pitivi] Allow using GES Project's save function with no timeline object
[pitivi] Allow using GES Project's save function with no timeline object
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-editing-services
git master
Other Linux
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 709472
 
 
Reported: 2013-08-25 22:20 UTC by Jean-François Fortin Tam
Modified: 2018-05-07 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screencast (506.53 KB, video/webm)
2013-08-25 22:27 UTC, Jean-François Fortin Tam
Details

Description Jean-François Fortin Tam 2013-08-25 22:20:40 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
Comment 1 Jean-François Fortin Tam 2013-08-25 22:27:52 UTC
Created attachment 253077 [details]
screencast
Comment 2 Thibault Saunier 2014-11-01 10:38:58 UTC
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.
Comment 3 Thibault Saunier 2015-09-23 17:06:50 UTC
What is up with that issue?
Comment 4 Edward Hervey 2018-05-07 14:20:52 UTC
What's up is that nothing happened in 5 years. Closing for lack of info/context.

Re-open after discussion with GES maintainers maybe ?