ImportError: cannot import name shlex_split_unicode

Bug #1114680 reported by Jeffrey Glenn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Explorer
New
Undecided
Unassigned

Bug Description

Below are the contents of my command window. The error is at the end. My system is running Windows Vista and I have a 64-bit PC.

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Jeff>which bzr
C:\Program Files (x86)\Bazaar\bzr.exe

C:\Users\Jeff>bzr
Bazaar 2.5.1 -- a free distributed version-control tool
http://bazaar.canonical.com/

Basic commands:
  bzr init makes this directory a versioned branch
  bzr branch make a copy of another branch

  bzr add make files or directories versioned
  bzr ignore ignore a file or pattern
  bzr mv move or rename a versioned file

  bzr status summarize changes in working copy
  bzr diff show detailed diffs

  bzr merge pull in changes from another branch
  bzr commit save some or all changes
  bzr send send changes via email

  bzr log show history of changes
  bzr check validate storage

  bzr help init more help on e.g. init command
  bzr help commands list all commands
  bzr help topics list all help topics

C:\Users\Jeff>bzr status
bzr: ERROR: Not a branch: "C:/Users/Jeff/".

C:\Users\Jeff>bzr explorer
bzr: ERROR: exceptions.ImportError: cannot import name shlex_split_unicode

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 920, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1131, in run_bzr
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 695, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\commands.py", line 16
1, in run
  File "bzrlib\lazy_import.pyo", line 108, in __getattribute__
  File "bzrlib\lazy_import.pyo", line 85, in _resolve
  File "bzrlib\lazy_import.pyo", line 200, in _import
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 29
, in <module>
ImportError: cannot import name shlex_split_unicode

bzr 2.5.1 on python 2.6.6 (Windows-Vista-6.0.6002-SP2)
arguments: ['bzr', 'explorer']
plugins: bzrtools[2.5.0], changelog_merge[2.5.1], colo[0.4.0],
    explorer[1.1.1], fastimport[0.14.0dev], git[0.6.8], launchpad[2.5.1],
    loom[2.3.0dev], netrc_credential_store[2.5.1], news_merge[2.5.1],
    pipeline[1.4.0], qbzr[0.22.3], rewrite[0.6.4dev], svn[1.2.2],
    upload[1.2.0dev], xmloutput[0.8.8]
encoding: 'cp1252', fsenc: 'mbcs', lang: None

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

C:\Users\Jeff>

Revision history for this message
Jeffrey Glenn (jeff-f) wrote :

From Bug #911999 I learned a solution. I replaced "shlex_split_unicode" with "cmdline.split" in:

  o C:\Program Files (x86)\Bazaar\plugins\explorer\lib\app_suite.py, and
  o C:\Program Files (x86)\Bazaar\plugins\explorer\lib\explorer.py

For example: return cmdline.split(command) # shlex_split_unicode(command)

I also commented out "from bzrlib.commands import shlex_split_unicode" in both files.

Bazaar Explorer opened for me.

Revision history for this message
Jeffrey Glenn (jeff-f) wrote :

Not out of the woods yet... In Bazaar Explorer, I selected menu Bazaar - Plugins, and got an error. Here are the details:

bzr: ERROR: exceptions.NameError: global name 'cmdline' is not defined

Traceback (most recent call last):
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 1837, in do_bzr_plugins
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 1163, in run_bzr_gui
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\explorer.py", line 1190, in get_command_from_app_suite
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\app_suite.py", line 120, in lookup
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\app_suite.py", line 138, in _lookup_here
  File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\app_suite.py", line 150, in command_to_args
NameError: global name 'cmdline' is not defined

bzr 2.5.1 on python 2.6.6 (win32)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'explorer']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.5.0]
  changelog_merge C:\Program Files (x86)\Bazaar\plugins\changelog_merge [2.5.1]
  colo C:\Program Files (x86)\Bazaar\plugins\colo [0.4.0]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [1.1.1]
  fastimport C:\Program Files (x86)\Bazaar\plugins\fastimport [0.14.0dev]
  git C:\Program Files (x86)\Bazaar\plugins\git [0.6.8]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.5.1]
  loom C:\Program Files (x86)\Bazaar\plugins\loom [2.3.0dev]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.5.1]
  news_merge C:\Program Files (x86)\Bazaar\plugins\news_merge [2.5.1]
  pipeline C:\Program Files (x86)\Bazaar\plugins\pipeline [1.4.0]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.22.3]
  rewrite C:\Program Files (x86)\Bazaar\plugins\rewrite [0.6.4dev]
  svn C:\Program Files (x86)\Bazaar\plugins\svn [1.2.2]
  upload C:\Program Files (x86)\Bazaar\plugins\upload [1.2.0dev]
  xmloutput C:\Program Files (x86)\Bazaar\plugins\xmloutput [0.8.8]

Revision history for this message
Jeffrey Glenn (jeff-f) wrote :
Revision history for this message
Vincent Ladeuil (vila) wrote :

bzr-explorer bug, seems to be fixed there.

affects: bzr → bzr-explorer
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.