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 781586 - Save and Save as buttons do not save files
Save and Save as buttons do not save files
Status: RESOLVED DUPLICATE of bug 771498
Product: meld
Classification: Other
Component: filediff
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: meld-maint
meld-maint
https://bugs.launchpad.net/bugs/1685216
Depends on:
Blocks:
 
 
Reported: 2017-04-21 13:12 UTC by Nrbrtx
Modified: 2017-04-21 21:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nrbrtx 2017-04-21 13:12:04 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):
  • File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 433 in on_menu_save_activate
    self.current_doc().save()
  • File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1823 in save
    self.save_file(pane)
  • 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 433 in on_menu_save_activate
    self.current_doc().save()
  • File "/usr/lib/python2.7/dist-packages/meld/filediff.py", line 1823 in save
    self.save_file(pane)
  • 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/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.
Comment 1 Kai Willadsen 2017-04-21 21:05:15 UTC
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 ***