On Feb 11, 3:47 pm, "Edward K. Ream" <[email protected]> wrote:
> On Feb 11, 7:39 am, zpcspm <[email protected]> wrote:
>
> > On Feb 11, 3:33 pm, "Edward K. Ream" <[email protected]> wrote:
>
> > > > What happens when you change the @first line in the tests to
> ...
> > > �...@first # -*- coding: koi8-r -*-
>
> Also, I'd like to know what happens with this encoding line when you
> use execute-script on the node, both with Python 2.x and 3.x.

I'll operate only with the first failing test (@test can't open
message in g.openWithFileName) , to restrict the issue.

So:
- running it unmodified with 'run-unit-tests-locally' results in the
traceback that I've reported in the first post
- replacing the first line of the test body with
@first # -*- coding: koi8-r -*-
and re-running the tests results in a similar traceback:

ERROR: @test can't open message in g.openWithFileName

----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/1/leo-current/leo/core/leoTest.py", line 185, in runTest
    exec(script,d)
  File "<string>", line 8, in <module>
  File "/tmp/1/leo-current/leo/core/leoGlobals.py", line 2377, in
openWithFileName
    isLeo,fn,relFn = g.mungeFileName(fileName)
  File "/tmp/1/leo-current/leo/core/leoGlobals.py", line 2481, in
mungeFileName
    isZipped = fn and zipfile.is_zipfile(fn)
  File "/usr/lib/python2.6/zipfile.py", line 134, in is_zipfile
    fpin = open(filename, "rb")
  File "/usr/lib/python2.6/encodings/koi8_r.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u1fb9'
in position 32: character maps to <undefined>

----------------------------------------------------------------------
Ran 1 test in 0.042s

FAILED (errors=1)
- running the test node with 'execute-script' results with following
error message being printed to the leo log pane:

exception executing script
UnicodeEncodeError: 'charmap' codec can't encode character u'\u1fb9'
in position 32: character maps to <undefined>
--------------------
  line 11:     def encode(self,input,errors='strict'):
* line 12:         return
codecs.charmap_encode(input,errors,encoding_table)
  line 13:
  line 14:     def decode(self,input,errors='strict'):

These are all for python 2.6.2. Unfortunately I can't afford to run
leo with python3 - that would require me to build pyqt4 for python3
myself. As I was told, running leo with tk interface and python3 is
not an option as well ATM, because Pmw are not ported to python3 yet.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to