bzr explorer can't open repository (bzr can't handle EINVAL error)

Bug #827721 reported by IWATA Hidetaka
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
IWATA Hidetaka
2.4
Fix Released
Medium
IWATA Hidetaka
Bazaar Explorer
Invalid
Undecided
Unassigned

Bug Description

When trying to open shared repository by bzr-explorer, this exception occurs every time.

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

bzr 2.4-b4 worked correctly.

This line
  > mutter("EINVAL returned on path %s: %s" % (path, e))
obviously should be
  > mutter("EINVAL returned on path %s: %r" % (path, e))

TRACEBACK
------------------
Traceback (most recent call last):
  File "D:\ECO9659\BZR\test_plugins\explorer\lib\location_viewer.py", line 138, in _select_new_view
    view = model.view()
  File "D:\ECO9659\BZR\test_plugins\explorer\lib\location.py", line 178, in view
    return view.ui()
  File "D:\ECO9659\BZR\test_plugins\explorer\lib\view_repository.py", line 291, in ui
    self.refresh_view()
  File "D:\ECO9659\BZR\test_plugins\explorer\lib\view_repository.py", line 295, in refresh_view
    self._collect_data()
  File "D:\ECO9659\BZR\test_plugins\explorer\lib\view_repository.py", line 325, in _collect_data
    for control in controls:
  File "C:\DEVELOP\py_envs\bzr2.4\lib\site-packages\bzrlib\bzrdir.py", line 270, in find_bzrdirs
    subdirs = list_current(current_transport)
  File "C:\DEVELOP\py_envs\bzr2.4\lib\site-packages\bzrlib\bzrdir.py", line 253, in list_current
    return transport.list_dir('')
  File "C:\DEVELOP\py_envs\bzr2.4\lib\site-packages\bzrlib\transport\local.py", line 477, in list_dir
    self._translate_error(e, path)
  File "C:\DEVELOP\py_envs\bzr2.4\lib\site-packages\bzrlib\transport\__init__.py", line 328, in _translate_error
    mutter("EINVAL returned on path %s: %s" % (path, e))
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 12: ordinal not in range(128)

VERSION
-------------
Bazaar (bzr) 2.4.0
  Python interpreter: C:\DEVELOP\py_envs\bzr2.4\Scripts\python.exe 2.6.6
  Python standard library: C:\DEVELOP\py_envs\bzr2.4\lib
  Platform: Windows-7-6.1.7600
  bzrlib: C:\DEVELOP\py_envs\bzr2.4\lib\site-packages\bzrlib
  Bazaar configuration: C:\Users\iwata\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\iwata\Documents\.bzr.log

explorer 1.2.0
  Version Control for Human Beings.

Related branches

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

I bet this is bzrlib bug.

Revision history for this message
Martin Packman (gz) wrote :

Getting EINVAL here is unexpected and may be a bzr-explorer bug, but that's being masked the problem pointed out in the logging that was added in r6046 on trunk. Same old mixing of unicode paths and localised bytestrings in OSError messages.

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Martin Packman (gz)
Changed in bzr-explorer:
status: New → Incomplete
Revision history for this message
Martin Packman (gz) wrote :

Hidetaka, your proposed change looks good.

If you branch lp:bzr/2.4 and commit that, along with an entry in doc/en/release-notes/bzr-2.4.txt under 'Bug Fixes' something like:

* Avoid UnicodeDecode error when reporting EINVAL from transports.
  (IWATA Hidetaka, #829237)

Then you can do a merge propose for that branch against lp:bzr/2.4 we can land the fix and merge it up to trunk as well.

If that sounds like too much, just assign the bug back to me and I'll tackle it.

Changed in bzr:
assignee: nobody → IWATA Hidetaka (hid-iwata)
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.5b1
status: Confirmed → Fix Released
Revision history for this message
Martin Packman (gz) wrote :

Thanks for resolving the Bazaar side of this Hidetaka. If you can do the same steps with a fixed version and look at the line that gets mutter puts in .bzr.log it may help us work out if Bazaar Explorer also has as issue that needs fixing.

Changed in bzr-explorer:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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