GNOME Bugzilla – Bug 781586
Save and Save as buttons do not save files
Last modified: 2017-04-21 21:05:15 UTC
Steps to reproduce: 1. Start Meld 3.14.2 (3.14.2-1 on Ubuntu Xenial 16.04.2 LTS) from terminal. 2. Start "New Comparison" -> "File Comparison" -> "Blank Comparison" 3. Paste file contents from clipboard to left and right sides. 4. Press Save or Save as button on each side, select filepath for each side, press OK. 5. Try to exit from Meld (by Ctrl+Q). In opened window "Save changes to documents before closing?" click "Save". 6. Get errors in console: Traceback (most recent call last):
+ Trace 237385
self.current_doc().save()
self.save_file(pane)
text = text.encode(encoding)
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1837, in on_file_save_button_clicked self.save_file(idx) File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1764, in save_file text = text.encode(encoding) TypeError: encode() argument 1 must be string, not None Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1837, in on_file_save_button_clicked self.save_file(idx) File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1764, in save_file text = text.encode(encoding) TypeError: encode() argument 1 must be string, not None Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 299, in on_delete_event response = self.try_remove_page(page, appquit=1) File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 569, in try_remove_page response = page.on_delete_event(appquit) File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 915, in on_delete_event response = self.check_save_modified() File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 885, in check_save_modified if not self.save_file(i): File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1764, in save_file text = text.encode(encoding) TypeError: encode() argument 1 must be string, not None 7. Files are not saved. Expected results: Files are saved. Actual results: Files are not saved, got error in console.
Thanks for taking the time to report this. This bug has already been fixed in Meld 3.16.3. In addition, it's somewhat less dire than the bug title makes it sound; this affects only comparisons where files weren't loaded from disk. *** This bug has been marked as a duplicate of bug 771498 ***