GNOME Bugzilla – Bug 603209
Stores blank properties
Last modified: 2011-08-26 01:22:44 UTC
+++ This bug was initially created as a clone of Bug #603202 +++ Created an attachment (id=148636) project file and debug info Select XViD/mp3lame/AVI-muxer in the project settings' "export" dialog, and then load a clip in the timeline (it doesn't matter which), and then SAVE the project. Close down Pitivi. Now, try to reload that project file. It won't load anymore. I am attaching here both the project file that doesn't work anymore, and the actual python errors. For some reason... it stored a blank property (statsfile) from that encoder. I've just committed a fix in the loader to not try to load empty properties... but ideally we should figure out why it decided to store that empty property.
Edward, ping? Will this still be relevant with all the changes that have occured recently?
Edward, awaiting your response as per comment#1
This can be reproduced by trying to render a project, setting the video encoder to XviD, clicking the Advanced... button for the video encoder, then set the Statistics Filename field to an empty field (the default value is xvid-stats.log), then click OK, Close, Ctrl+S. Rendering works fine without it, I think it's a mistake that we ignore empty values, I'll make a fix.
Pushed a fix to https://github.com/aleb/pitivi/commits/fix_603209
Can this bug be closed now ?
Thanks for asking. Still waiting on Edward to review the fix.
don't use "if not value" but instead check for the proper 'wrong' value (None, False, 0, "", ...). otherwise looks good
Thanks. Done. Ready to be merged then: https://github.com/aleb/pitivi/commits/fix_603209
The patch seems to cause no particular regressions, though I'm not sure I understand yet why we need this? Also, I noticed that if I click the reset/clear button in the advanced codec properties, those fields such as the Statistics Filename one are not reset to xvid-stats.log...
(In reply to comment #9) > The patch seems to cause no particular regressions, though I'm not sure I > understand yet why we need this? We need this to allow the user to set a text property for an audio or video encoder to an empty string. > Also, I noticed that if I click the > reset/clear button in the advanced codec properties, those fields such as the > Statistics Filename one are not reset to xvid-stats.log... Indeed, from what I noticed it happens with the text properties. A different bug should be filed for this problem.
commit b6954312ba8246e32296adac67d14fcf897034bb Author: Alex Băluț <alexandru.balut@gmail.com> Date: Thu Jul 7 11:18:42 2011 +0200 Change ElementTreeFormatter to allow storing empty string values. Fixes bug 603209. Note: opening bug 657393 for the problem found in comment #9.