Re: [dabo-users] Fw: Unicode Encode Error

Author: Paul McNett

Posted: 2012-04-20 at 14:56:38

Please try manually patching dabo/ide/Editor.py with these changes:

Index: Editor.py

===================================================================

--- Editor.py (revision 7134)

+++ Editor.py (working copy)

@@ -10,6 +10,7 @@

import operator

import dabo

import dabo.dEvents as dEvents

+from dabo.lib.utils import ustr

from dabo.dLocalize import _

_Use_Subprocess = True

try:

@@ -897,7 +898,7 @@

fileDir = os.path.split(ed.FilePath)[0]

if fileDir:

os.chdir(fileDir)

- txt = ed.Text

+ txt = ustr(ed.Text)

fname = getTempFile(ext="py")

f = open(fname, "w")

f.write(txt)

On 4/20/12 12:52 PM, Zdravko Subakov wrote:

> You are the King, I tried runnig app directly without using editor.py and it

> worked strait away. So I entered all culprit letters from Serbian Latin and

> a couple from Hungarian and it worked!

> Now I have to try other editor that could write Cyrilic cause Textpad that I

> was using cannot do that.

> Any suggestion for editor that would work for me or I should wait for a fix

> for Dabo's Editor.py?

>

> Z.

> ----- Original Message -----

> From: "Paul McNett"<p@ulmcnett.com>

> To: "Dabo Users list"<dabo-users@leafe.com>

> Sent: Friday, April 20, 2012 9:35 PM

> Subject: Re: [dabo-users] Fw: Unicode Encode Error

>

>

>> Sorry, I guess you are using dabo/ide/Editor.py. I was confused because

>> I'm using a

>> case-sensitive operating system (Linux) and I'm actually surprised that it

>> got

>> reported in your traceback as 'editor.py' instead of 'Editor.py', even

>> though Windows

>> is case-insensitive.

>>

>> Well, it would help to isolate things. I have a hunch that the dabo

>> library isn't at

>> fault in this case, but something at the IDE level, but I could be wrong.

>>

>> Paul

>>

>>

>> On 4/20/12 12:31 PM, Zdravko Subakov wrote:

>>> I suppose I can, but the editor is in dabo/ide directory it looks it has

>>> syntax coloring etc. ok so I thought its ok to use it. Why? Do you it

>>> that

>>> is the problem?

>>>

>>> Z.

>>>

>>> ----- Original Message -----

>>> From: "Paul McNett"<p@ulmcnett.com>

>>> To: "Dabo Users list"<dabo-users@leafe.com>

>>> Sent: Friday, April 20, 2012 9:21 PM

>>> Subject: Re: [dabo-users] Fw: Unicode Encode Error

>>>

>>>

>>>> What is editor.py? Can you try editing directly in vim or any regular

>>>> text

>>>> editor

>>>> instead?

>>>>

>>>> Paul

>>>>

>>>>

>>>> On 4/20/12 12:01 PM, Zdravko Subakov wrote:

>>>>> Ups I used wrong email account and now the email is waiting for

>>>>> approval,

>>>>> here is the original

>>>>> Z.

>>>>> ----- Original Message -----

>>>>> From: "Zdravko Subakov"<subakovz@stcable.net>

>>>>> To: "Dabo Users list"<dabo-users@leafe.com>

>>>>> Sent: Friday, April 20, 2012 8:55 PM

>>>>> Subject: Re: [dabo-users] Unicode Encode Error

>>>>>

>>>>>

>>>>>> Thanks Paul for being so quick,

>>>>>>

>>>>>> No, the dabodemo worked ok, I even lost some time with that Montana

>>>>>> solitaire. The problem started when I tried to modify the PyCon 2010

>>>>>> Hello

>>>>>> World application.

>>>>>>

>>>>>> I copied a couple of lines and it worked.

>>>>>> Ok I thought, how does it look if I try the only 5 different

>>>>>> letters(from

>>>>>> English Latin) in Serbian Latin SDCCZ. And as soon as I put it app was

>>>>>> stuck, the error appeared in command window, so the only way out was

>>>>>> CTRL+C, which terminated Python call for editor.py which I have been

>>>>>> using

>>>>>> to code the Hello World program.

>>>>>>

>>>>>> Z.

>>>>>>

>>>>>> ----- Original Message -----

>>>>>> From: "Paul McNett"<p@ulmcnett.com>

>>>>>> To: "Dabo Users list"<dabo-users@leafe.com>

>>>>>> Sent: Friday, April 20, 2012 8:39 PM

>>>>>> Subject: Re: [dabo-users] Unicode Encode Error

>>>>>>

>>>>>>

>>>>>>

>>>>>>

>>>>>>>

>>>>>>> Can you narrow down for us when/where this is happening? IOW, if you

>>>>>>> run

>>>>>>> dabo/demo/DaboDemo.py, does that cause a unicode error?

>>>>>>>

>>>>>>> Thanks

>>>>>>> Paul

>>>>>>>

>>>>>>>

>>>>>>> _______________________________________________

>>>>>>> Post Messages to: Dabo-users@leafe.com

>>>>>>> Subscription Maintenance:

>>>>>>> http://leafe.com/mailman/listinfo/dabo-users

>>>>>>> Searchable Archives: http://leafe.com/archives/search/dabo-users

>>>>>>> This message:

>>>>>>> http://leafe.com/archives/byMID/4F91AD50.8040004@ulmcnett.com

>>>>>>>

>>>>>>

>>>>>

>>>>> _______________________________________________

>>>>> Post Messages to: Dabo-users@leafe.com

>>>>> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

>>>>> Searchable Archives: http://leafe.com/archives/search/dabo-users

>>>>> This message:

>>>>> http://leafe.com/archives/byMID/3661B33093304674B51582ECDF2161DE@Perajoe

>>>>

>>>> _______________________________________________

>>>> Post Messages to: Dabo-users@leafe.com

>>>> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

>>>> Searchable Archives: http://leafe.com/archives/search/dabo-users

>>>> This message:

>>>> http://leafe.com/archives/byMID/4F91B754.1020404@ulmcnett.com

>>>>

>>>

>>> _______________________________________________

>>> Post Messages to: Dabo-users@leafe.com

>>> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

>>> Searchable Archives: http://leafe.com/archives/search/dabo-users

>>> This message:

>>> http://leafe.com/archives/byMID/8E551C97C0CD4BEBB66D63ABAF2D60D4@Perajoe

>>

>> _______________________________________________

>> Post Messages to: Dabo-users@leafe.com

>> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

>> Searchable Archives: http://leafe.com/archives/search/dabo-users

>> This message:

>> http://leafe.com/archives/byMID/4F91BA97.5010302@ulmcnett.com

>>

>

> _______________________________________________

> Post Messages to: Dabo-users@leafe.com

> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

> Searchable Archives: http://leafe.com/archives/search/dabo-users

> This message: http://leafe.com/archives/byMID/8C5E46449C5B4D74983BF4BC9CA1ADC4@Perajoe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/4F91BF76.6000908@ulmcnett.com

©2012 Paul McNett