Unicode error when executing 'rst3' command.

Bug #923301 reported by Viktor Ransmayr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Low
Edward K. Ream

Bug Description

I am opening a bug for this, since I think that a Leo-Newbie might not be
able to find a work around for this issue.

The 'rst3' command just fails silently - and - does not create any output
file at all. - It took me a while to find the offending section in the body
of a large outline node, so that the 'rst3' command was able to create
an output file again.

<log>

D:\Users\Viktor Ransmayr\Documents>leo ./BR-2012-01-28.leo

** isPython3: True
Leo 4.9.1 devel, build 4950, 2012-01-28 10:16:45
Python 3.2.2, qt version 4.8.0
Windows 6, 1, 7601, 2, Service Pack 1
reading settings in D:\Branches\leo-editor\leo\config\leoSettings.leo
reading settings in D:\Users\Viktor Ransmayr\.leo\myLeoSettings.leo
reading settings in D:\Users\Viktor Ransmayr\Documents\BR-2012-01-28.leo
wrote recent file: D:\Users\Viktor Ransmayr\.leo\.leoRecentFiles.txt
<string>:179: (WARNING/2) Literal block expected; none found.
Traceback (most recent call last):
  File "D:\Branches\leo-editor\leo\plugins\qtGui.py", line 8689, in eventFilter
    ret = k.masterKeyHandler(event)
  File "D:\Branches\leo-editor\leo\core\leoKeys.py", line 2897, in masterKeyHandler
    done,val = k.doMode(event,state,stroke)
  File "D:\Branches\leo-editor\leo\core\leoKeys.py", line 2973, in doMode
    val = k.callStateFunction(event) # Calls end-command.
  File "D:\Branches\leo-editor\leo\core\leoKeys.py", line 2947, in callStateFunction
    val = k.state.handler(event)
  File "D:\Branches\leo-editor\leo\core\leoKeys.py", line 2010, in fullCommand
    k.callAltXFunction(k.mb_event)
  File "D:\Branches\leo-editor\leo\core\leoKeys.py", line 2056, in callAltXFunction
    func(event)
  File "D:\Branches\leo-editor\leo\core\leoRst.py", line 472, in rst3
    self.processTopTree(self.c.p)
  File "D:\Branches\leo-editor\leo\core\leoRst.py", line 482, in processTopTree

self.processTree(p,ext=None,toString=False,justOneFile=justOneFile)
  File "D:\Branches\leo-editor\leo\core\leoRst.py", line 510, in processTree

self.write_rst_tree(p,ext,fn,toString=toString,justOneFile=justOneFile)
  File "D:\Branches\leo-editor\leo\core\leoRst.py", line 560, in write_rst_tree

self.write_files(ext,fn,callDocutils,toString,writeIntermediateFile)
  File "D:\Branches\leo-editor\leo\core\leoRst.py", line 1749, in write_files
    f.write(s)
  File "C:\Python32\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u0142' in position
19816: character maps to <undefined>

</log>

This has been re-produced with the latest revision of leo-trunk. - If wanted,
I can send a minimal outline that consistently produces this tracedback.

Revision history for this message
Viktor Ransmayr (vr123456) wrote :

Updating to revision 4595 the problem re-appeared - and - is no longer fixable,
i.e. this leo outline is un-changeable to me.

/VR

Revision history for this message
Viktor Ransmayr (vr123456) wrote :

Update to the previous msg:

Updating to revision 4595 the problem re-appeared - and - is no longer
fixable, i.e. this leo outline is *** now *** un-changeable ...

/VR

Revision history for this message
Edward K. Ream (edreamleo) wrote : Re: [Bug 923301] Re: Unicode error when executing 'rst3' command.

On Mon, Jan 30, 2012 at 3:41 PM, Viktor Ransmayr
<email address hidden> wrote:
> Update to the previous msg:
>
> Updating to revision 4595 the problem re-appeared - and - is no longer
> fixable, i.e. this leo outline is *** now *** un-changeable ...

I assume you mean rev 4959.

EKR

Changed in leo-editor:
importance: Undecided → Medium
assignee: nobody → Edward K. Ream (edreamleo)
Changed in leo-editor:
milestone: none → 4.10-b1
Changed in leo-editor:
importance: Medium → Low
Revision history for this message
Edward K. Ream (edreamleo) wrote :

Rev 5083 attempts a fix. Please reopen this bug if needed.

Changed in leo-editor:
status: New → Fix Released
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.