Save with no open file give python errors

Bug #908141 reported by Byrial Jensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PoProofRead. poproofread has MOVED to github
Won't Fix
High
TLE

Bug Description

1) Open poproofread
2) Select "save" in the file menu
3) You get this error message on stderr:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/poproofread/poproofread_gtk.py", line 201, in on_mnu_save
    self.ppr.save()
  File "/usr/lib/pymodules/python2.7/poproofread/core.py", line 45, in save
    self.fileio.write(self.content)
  File "/usr/lib/pymodules/python2.7/poproofread/fileio.py", line 125, in write
    self.__write_to_ppr(content)
  File "/usr/lib/pymodules/python2.7/poproofread/fileio.py", line 130, in __write_to_ppr
    with open(self.ppr_file, 'w') as f:
TypeError: coercing to Unicode: need string or buffer, NoneType found

1) Open poproofread
2) Write something in the comment window
3) Select "save" in the file menu
4) You get this error message on stderr:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/poproofread/poproofread_gtk.py", line 200, in on_mnu_save
    if not self.check_for_new_comment_and_save_it():
  File "/usr/lib/pymodules/python2.7/poproofread/poproofread_gtk.py", line 365, in check_for_new_comment_and_save_it
    self.ppr.update_comment(self.read_comment())
  File "/usr/lib/pymodules/python2.7/poproofread/core.py", line 85, in update_comment
    self.content['text'][self.content['current']]['comment'] = new_comment
TypeError: 'NoneType' object is not subscriptable

TLE (k-nielsen81)
Changed in poproofread:
milestone: none → 0.1.8
status: New → Confirmed
importance: Undecided → High
assignee: nobody → TLE (k-nielsen81)
Revision history for this message
TLE (k-nielsen81) wrote :

Thanks for reporting this.

I forgot to check if the there was a file active when activating the save functionality.

Changed in poproofread:
status: Confirmed → Fix Committed
Revision history for this message
TLE (k-nielsen81) wrote :

Fixed in revision 76 and will be released in version 0.1.8.

TLE (k-nielsen81)
Changed in poproofread:
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.