UnicodeEncodeError in isdir

Bug #884327 reported by Adi Roiban
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

I am trying to run bzr dedicated server for getting a branch on Solaris 10 and I got the following error:

solaris10-x86$ bzr branch bzr+ssh://192.168.2.104/home/adi/project/server/devel
adi@192.168.2.104's password:
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u021b' in position 90: ordinal not in range(128)

Traceback (most recent call last):
  File "/opt/csw/lib/python/site-packages/bzrlib/commands.py", line 923, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/commands.py", line 1128, in run_bzr
    ret = run(*run_argv)
  File "/opt/csw/lib/python/site-packages/bzrlib/commands.py", line 676, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/opt/csw/lib/python/site-packages/bzrlib/commands.py", line 698, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/builtins.py", line 1314, in run
    source_branch=br_from)
  File "/opt/csw/lib/python/site-packages/bzrlib/bzrdir.py", line 454, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/opt/csw/lib/python/site-packages/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/opt/csw/lib/python/site-packages/bzrlib/bzrdir.py", line 513, in _sprout
    hardlink=hardlink, from_branch=result_branch)
  File "/opt/csw/lib/python/site-packages/bzrlib/bzrdir.py", line 1175, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/opt/csw/lib/python/site-packages/bzrlib/workingtree_4.py", line 1550, in initialize
    delta_from_tree=delta_from_tree)
  File "/opt/csw/lib/python/site-packages/bzrlib/transform.py", line 2532, in build_tree
    delta_from_tree)
  File "/opt/csw/lib/python/site-packages/bzrlib/transform.py", line 2650, in _build_tree
    tt.finalize()
  File "/opt/csw/lib/python/site-packages/bzrlib/transform.py", line 1217, in finalize
    delete_any(path)
  File "/opt/csw/lib/python/site-packages/bzrlib/osutils.py", line 1070, in delete_any
    _delete_file_or_dir(path)
  File "/opt/csw/lib/python/site-packages/bzrlib/osutils.py", line 1089, in _delete_file_or_dir
    if isdir(path): # Takes care of symlinks
  File "/opt/csw/lib/python/site-packages/bzrlib/osutils.py", line 532, in isdir
    return stat.S_ISDIR(os.lstat(f)[stat.ST_MODE])
UnicodeEncodeError: 'ascii' codec can't encode character u'\u021b' in position 90: ordinal not in range(128)

bzr 2.5b2 on python 2.6.6 (Solaris-2.10-i86pc-i386-32bit-ELF)
arguments: ['/opt/csw/bin/bzr', 'branch',
    'bzr+ssh://192.168.2.104/home/adi/project/server/devel']
plugins: bash_completion[2.5b2], changelog_merge[2.5b2], launchpad[2.5b2],
    netrc_credential_store[2.5b2], news_merge[2.5b2], weave_fmt[2.5b2]
encoding: '646', fsenc: '646', lang: None

Tags: unicode
Revision history for this message
Martin Pool (mbp) wrote :

The immediate problem here is that your filesystem encoding is '646' which is (approximately) ascii, but you seem to have a non-ascii-named file. Do you know what filesystem encoding this machine is actually supposed to be using?

This is probably an instance of or a duplicate of bug 794353.

I don't think there's anything very solaris or ssh specific here.

summary: - bzr+ssh fails on Solaris 10 x86
+ UnicodeEncodeError in isdir
tags: added: unicode
Revision history for this message
Adi Roiban (adiroiban) wrote :

You are right. This is not SSH or Solaris specific.

I am using a default installation of Solaris 10, with the following locales installed:

$ locale -a
C
POSIX
iso_8859_1

----

Even if the filesystem encoding is set to 646, it allows UTF-8 filenames.

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.