BZR > Explorer > UnicodeDecodeError

Bug #429911 reported by poulanker
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Fix Released
High
Ian Clatworthy

Bug Description

clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 429911] [NEW] BZR > Explorer > UnicodeDecodeError

poulanker пишет:
> Public bug reported:
>
> clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
> clicking on a directory does not produce the error.

Can you say us what was filename leading to this error/

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

What's the path to your configured editor?

Changed in bzr-explorer:
importance: Undecided → High
Revision history for this message
poulanker (pae) wrote : SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

Good point ;-)

Actually the editor was not configured (the field was left blank).
This also had the effect that clicking "Settings,Locations" or "Settings,Credentials" produced the same error.
As soon as I entered e.g. Notepad.exe as the editor, the problem disappeared.
May I suggest that you as default open e.g. Notepad, should the user have forgotten to configure an editor?

BTW I think bzr explorer is a great app :-)

Best regards

Poul Anker Ersly

________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Ian Clatworthy [<email address hidden>]
Sendt: 16. september 2009 04:11
Til: Poul Anker Ersly
Emne: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

What's the path to your configured editor?

** Changed in: bzr-explorer
   Importance: Undecided => High

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: New

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

Revision history for this message
Alexander Belchenko (bialix) wrote :

Can you tell us the location where Wordpad.exe is installed on your system?

Revision history for this message
poulanker (pae) wrote :

WordPad is located in "C:\Program Files\Windows NT\Accessories\wordpad.exe"
Actually I just entered "notepad.exe" without the path. It resides in the "C:\Windows" directory which is per default included in the path environment variable.

Have you read my previous response to "Ian Clatworthy"?

Best regards

Poul Anker Ersly

________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Alexander Belchenko [<email address hidden>]
Sendt: 16. september 2009 11:23
Til: Poul Anker Ersly
Emne: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

Can you tell us the location where Wordpad.exe is installed on your
system?

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: New

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

Revision history for this message
Alexander Belchenko (bialix) wrote :

poulanker пишет:
> WordPad is located in "C:\Program Files\Windows NT\Accessories\wordpad.exe"
> Actually I just entered "notepad.exe" without the path. It resides in the "C:\Windows" directory which is per default included in the path environment variable.
>
> Have you read my previous response to "Ian Clatworthy"?

I've read, but I don't understand how notepad.exe is related to
UnicodeError.

Have you seen my question about actual filename that leads to error?

Revision history for this message
poulanker (pae) wrote : SV: SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

Yes, but I noticed that the error could be provoked in other ways. I do therefore not think it is related to a specific filename.
I can reproduce the error anytime by removing the editor entry in the "Settings,Configuration,User Configuration" and then attempt to open "Settings, Locations".

/poul anker
________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Alexander Belchenko [<email address hidden>]
Sendt: 16. september 2009 13:20
Til: Poul Anker Ersly
Emne: Re: SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

poulanker пишет:
> WordPad is located in "C:\Program Files\Windows NT\Accessories\wordpad.exe"
> Actually I just entered "notepad.exe" without the path. It resides in the "C:\Windows" directory which is per default included in the path environment variable.
>
> Have you read my previous response to "Ian Clatworthy"?

I've read, but I don't understand how notepad.exe is related to
UnicodeError.

Have you seen my question about actual filename that leads to error?

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: New

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

Revision history for this message
Alexander Belchenko (bialix) wrote :

poulanker пишет:
> Yes, but I noticed that the error could be provoked in other ways. I do therefore not think it is related to a specific filename.
> I can reproduce the error anytime by removing the editor entry in the "Settings,Configuration,User Configuration" and then attempt to open "Settings, Locations".

Can I asking you to make some testing for me? I'm still does not
understand why you get this error, but I'd like to fix it.

Are you installing bzr-explorer using windows installer?

Revision history for this message
poulanker (pae) wrote : SV: SV: SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

I installed using "bzr-explorer-setup-0.8.exe"

Sure, I will help you if I can, just tell me what to do :-)

________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Alexander Belchenko [<email address hidden>]
Sendt: 16. september 2009 15:29
Til: Poul Anker Ersly
Emne: Re: SV: SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

poulanker пишет:
> Yes, but I noticed that the error could be provoked in other ways. I do therefore not think it is related to a specific filename.
> I can reproduce the error anytime by removing the editor entry in the "Settings,Configuration,User Configuration" and then attempt to open "Settings, Locations".

Can I asking you to make some testing for me? I'm still does not
understand why you get this error, but I'd like to fix it.

Are you installing bzr-explorer using windows installer?

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: New

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I'd really like to get to the bottom of this ASAP. If appropriate, I'd like it resolved by or fixed in 0.8.2.

How are your Python skills? Can you add a print statement to split_command_options() in lib\explorer.py showing the value of command? You'll want something like this ...

    print "command is %s" % command

Note that the print statement should occur just before shlex_split_unicode() is called and be indented exactly 4 spaces like the rest of the statements in that function.

Revision history for this message
poulanker (pae) wrote : SV: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError
Download full text (3.1 KiB)

I have no python skills, but your instructions were good and easy to carry out :-)

This is the result of the print statement when I have entered just "notepad.exe" in the editor field:
'command is notepad.exe'
If I leave the editor field empty, you apparently try to resolve the path to wordpad.exe:
'command is C:/Programmer/Windows NT/Tilbeh°r/WORDPAD.EXE'

On my danish Windows XP this path contains a danish character (Accessories translates to Tilbehør in danish).
May I suggest that you do not try to resolve the path, but only default to the name of the editor. I also think that "notepad.exe" is a better choice, because I figure that the editor is only used for short messages like changes description, version info and the like.

I hope this helps.

________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Ian Clatworthy [<email address hidden>]
Sendt: 21. september 2009 09:09
Til: Poul Anker Ersly
Emne: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

I'd really like to get to the bottom of this ASAP. If appropriate, I'd
like it resolved by or fixed in 0.8.2.

How are your Python skills? Can you add a print statement to
split_command_options() in lib\explorer.py showing the value of command?
You'll want something like this ...

    print "command is %s" % command

Note that the print statement should occur just before
shlex_split_unicode() is called and be indented exactly 4 spaces like
the rest of the statements in that function.

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: New

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaa...

Read more...

Revision history for this message
Alexander Belchenko (bialix) wrote :

poulanker пишет:
> I have no python skills, but your instructions were good and easy to
> carry out :-)
>
> This is the result of the print statement when I have entered just "notepad.exe" in the editor field:
> 'command is notepad.exe'
> If I leave the editor field empty, you apparently try to resolve the path to wordpad.exe:
> 'command is C:/Programmer/Windows NT/Tilbeh°r/WORDPAD.EXE'
>
> On my danish Windows XP this path contains a danish character (Accessories translates to Tilbehør in danish).
> May I suggest that you do not try to resolve the path, but only default to the name of the editor. I also think that "notepad.exe" is a better choice, because I figure that the editor is only used for short messages like changes description, version info and the like.
>
> I hope this helps.

Wow. Cool. Nice catch. On my Russian Windows XP the path does not
contain non-ascii characters.

Ian, it seems we should cast editor to unicode. There is helper function
in bzrlib/win32utils.py.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Fixed in rev 284 I hope. Please test.

Changed in bzr-explorer:
milestone: none → 0.8.2
status: New → Fix Released
Changed in bzr-explorer:
assignee: nobody → Ian Clatworthy (ian-clatworthy)
Revision history for this message
poulanker (pae) wrote :

I downloaded the branch and made a quick test on this specific bug.
If I leave the editor field empty, wordpad.exe is now executed as default.
Good job.

________________________________________
Fra: <email address hidden> [<email address hidden>] P&#229; vegne af Ian Clatworthy [<email address hidden>]
Sendt: 22. september 2009 05:13
Til: Poul Anker Ersly
Emne: [Bug 429911] Re: BZR > Explorer > UnicodeDecodeError

Fixed in rev 284 I hope. Please test.

** Changed in: bzr-explorer
       Status: New => Fix Released

** Changed in: bzr-explorer
    Milestone: None => 0.8.2

--
BZR > Explorer > UnicodeDecodeError
https://bugs.launchpad.net/bugs/429911
You received this bug notification because you are a direct subscriber
of the bug.

Status in Bazaar Explorer: Fix Released

Bug description:
clicking on a file in the left window of bzr explorer produces an exception (see traceback below).
clicking on a directory does not produce the error.

Regards
Poul Anker Ersly

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/Programmer/Bazaar/plugins\explorer\lib\html_report_view.py", line 48, in do_link_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 1046, in _do_view_action
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 979, in edit_file
  File "C:/Programmer/Bazaar/plugins\explorer\lib\explorer.py", line 98, in split_command_options
  File "bzrlib\commands.pyo", line 882, in shlex_split_unicode
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 31: ordinal not in range(128)

bzr 1.18.1 on python 2.5.4 (win32)
arguments: ['bzr', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programmer\Bazaar\plugins\bzrtools [1.18]
  explorer C:\Programmer\Bazaar\plugins\explorer [0.8]
  launchpad C:\Programmer\Bazaar\plugins\launchpad [1.18.1]
  netrc_credential_store C:\Programmer\Bazaar\plugins\netrc_credential_store [1.18.1]
  qbzr C:\Programmer\Bazaar\plugins\qbzr [0.14.1]
  rebase C:\Programmer\Bazaar\plugins\rebase [0.5.3]
  svn C:\Programmer\Bazaar\plugins\svn [0.6.5]

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.