Error adding iTunes library on OSX

Bug #316196 reported by Bill Sullivan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned

Bug Description

I was trying to add my iTunes directory and bzr gave the below error and traceback.

...
added "iTunes/iTunes Music/MGMT"
added "iTunes/iTunes Music/Madonna"
added "iTunes/iTunes Music/Mannheim Steamroller"
added "iTunes/iTunes Music/Maren Ord"
added "iTunes/iTunes Music/Marjorie Fair"
added "iTunes/iTunes Music/Matan Ariel & Friends"
added "iTunes/iTunes Music/Mazzy Star"
added "iTunes/iTunes Music/Mel Tormé"
bzr: ERROR: exceptions.KeyError: u'Mel Torme\u0301'

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 499, in run
    no_recurse, action=action, save=not dry_run)
  File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 448, in smart_add
    this_ie = parent_ie.children[directory.base_path]
KeyError: u'Mel Torme\u0301'

bzr 1.10 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'add', 'iTunes/']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  fastimport /Users/enkrates/.bazaar/plugins/fastimport [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]

I'd be happy to add further information, if anyone asks.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 316196] [NEW] Error adding iTunes library on OSX

  status incomplete
  tags macos unicode

On 11 Jan 2009, Bill Sullivan <email address hidden> wrote:
> Public bug reported:
>
> I was trying to add my iTunes directory and bzr gave the below error
> and
> traceback.

Hi Bill,

I suspect this may be a problem with unicode normalization in mac file
names.

>
> ...
> added "iTunes/iTunes Music/MGMT"
> added "iTunes/iTunes Music/Madonna"
> added "iTunes/iTunes Music/Mannheim Steamroller"
> added "iTunes/iTunes Music/Maren Ord"
> added "iTunes/iTunes Music/Marjorie Fair"
> added "iTunes/iTunes Music/Matan Ariel & Friends"
> added "iTunes/iTunes Music/Mazzy Star"
> added "iTunes/iTunes Music/Mel Tormé"
> bzr: ERROR: exceptions.KeyError: u'Mel Torme\u0301'
>
> Traceback (most recent call last):
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line
> 893, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line
> 839, in run_bzr
> ret = run(*run_argv)
> File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line
> 539, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line
> 499, in run
> no_recurse, action=action, save=not dry_run)
> File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line
> 52, in tree_write_locked
> return unbound(self, *args, **kwargs)
> File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line
> 448, in smart_add
> this_ie = parent_ie.children[directory.base_path]
> KeyError: u'Mel Torme\u0301'

Could you please run

!python -c 'import os;print os.listdir("iTunes/iTunes Music/")'

and paste the relevant section about this name, probably as a quoted
string.
--
Martin <http://launchpad.net/~mbp>

Changed in bzr:
status: New → Incomplete
Revision history for this message
Bill Sullivan (enkrates) wrote :

Hello Martin,

I ran the python line you asked and the "Mel Torme" item was-

'Mel Torme\xcc\x81'

I noticed another unicode-y folder that I'll mention, in case this helps you understand how OSX handles these names-

'Queensry\xcc\x88che'

which is this band, for reference - http://en.wikipedia.org/wiki/Queensrÿche

Thanks for your help, and I remain happy to get more information about my system.

Revision history for this message
Bill Sullivan (enkrates) wrote :

I gave it another try with bzr 1.11 and got the same results. I'll paste in the information I pasted above again, expect when being run with bzr 1.11.

...
added "iTunes/iTunes Music/MGMT"
added "iTunes/iTunes Music/Madonna"
added "iTunes/iTunes Music/Mannheim Steamroller"
added "iTunes/iTunes Music/Maren Ord"
added "iTunes/iTunes Music/Marjorie Fair"
added "iTunes/iTunes Music/Matan Ariel & Friends"
added "iTunes/iTunes Music/Mazzy Star"
added "iTunes/iTunes Music/Mel Tormé"
bzr: ERROR: exceptions.KeyError: u'Mel Torme\u0301'

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 513, in run
    no_recurse, action=action, save=not dry_run)
  File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/mutabletree.py", line 462, in smart_add
    this_ie = parent_ie.children[directory.base_path]
KeyError: u'Mel Torme\u0301'

bzr 1.11 on python 2.5.1 (darwin)
arguments: ['/usr/local/bin/bzr', 'add', 'iTunes Music']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  fastimport /Users/enkrates/.bazaar/plugins/fastimport [unknown]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /Library/Python/2.5/site-packages/bzrlib/plugins/netrc_credential_store [unknown]

'Mel Torme\xcc\x81'

'Queensry\xcc\x88che'

Bill Sullivan (enkrates)
Changed in bzr:
status: Incomplete → Confirmed
Revision history for this message
Christian Reis (kiko) wrote :

Damn, Bill, you also broke Launchpad's URL identification code. You have a talent for this stuff! Filed https://bugs.edge.launchpad.net/launchpad-foundations/+bug/319927

Revision history for this message
Bill Sullivan (enkrates) wrote :

Is this bug a dupe of either:

https://bugs.launchpad.net/bzr/+bug/102935

https://bugs.launchpad.net/bzr/+bug/172383

It seems that the unicode on OS X is incompletely supported by bzr. do I understand this correctly?

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.