NoneType is unsubscriptable in _dirstate_helpers_pyx.ProcessEntryC._process_entry

Bug #449745 reported by Jim LewisMoss on 2009-10-12
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Martin Pool

Bug Description

OK. So I added dir src/bar. Decided I wanted to move it into src/foo so "bzr mkdir src/foo" Then got error doing "bzr mv src/bar src/foo" But bar was moved to foo (no commits in here anywhere). Now I get the following everytime I do a "bzr st":
--------------------------------------------------------------------------------------------------------------
bzr: ERROR: exceptions.TypeError: 'NoneType' object is unsubscriptable

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/loom/commands.py", line 172, in run_argv_aliases
    self._original_command().run_argv_aliases(argv, alias_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1052, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 319, in run
    show_pending=(not no_pending), verbose=verbose)
  File "/usr/lib/python2.5/site-packages/bzrlib/status.py", line 118, in show_tree_status
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 95, in changes_from
    want_unversioned=want_unversioned,
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/tree.py", line 977, in compare
    want_unversioned=want_unversioned)
  File "/usr/lib/python2.5/site-packages/bzrlib/delta.py", line 230, in _compare_trees
    want_unversioned=want_unversioned):
  File "_dirstate_helpers_pyx.pyx", line 1405, in _dirstate_helpers_pyx.ProcessEntryC.__next__
  File "_dirstate_helpers_pyx.pyx", line 1669, in _dirstate_helpers_pyx.ProcessEntryC._iter_next
  File "_dirstate_helpers_pyx.pyx", line 1294, in _dirstate_helpers_pyx.ProcessEntryC._process_entry
TypeError: 'NoneType' object is unsubscriptable

bzr 2.0.0 on python 2.5.4 (Linux-2.6.30-2-amd64-x86_64-with-debian-squeeze-sid)
arguments: ['/usr/bin/bzr', 'st']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  automirror /home/jlewismoss/.bazaar/plugins/automirror [0.0.2]
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3.0dev]
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.95.0dev]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  cvsps_import /usr/lib/python2.5/site-packages/bzrlib/plugins/cvsps_import [unknown]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [0.1.0dev]
  email /usr/lib/python2.5/site-packages/bzrlib/plugins/email [unknown]
  etckeeper /usr/lib/python2.5/site-packages/bzrlib/plugins/etckeeper [unknown]
  fastimport /usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport [0.9.0dev]
  git /usr/lib/python2.5/site-packages/bzrlib/plugins/git [0.4.1]
  gtk /home/jlewismoss/.bazaar/plugins/gtk [0.98.0dev1]
  hg /usr/lib/python2.5/site-packages/bzrlib/plugins/hg [0.1.0dev]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [2.0.0]
  loggerhead /usr/lib/python2.5/site-packages/bzrlib/plugins/loggerhead [1.17.0]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4.0dev]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0]
  search /usr/lib/python2.5/site-packages/bzrlib/plugins/search [1.7.0dev]
  stats /usr/lib/python2.5/site-packages/bzrlib/plugins/stats [unknown]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [1.0.0]
  upload /usr/lib/python2.5/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /usr/lib/python2.5/site-packages/bzrlib/plugins/xmloutput [0.8.5]

*** 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.
---------------------------------------------------------------------------------------------------------------------------

Removing ("rm -rf src/foo") src/foo doesn't clear up the problem. Still same error.

Running "bzr check" gets me the following:

Checking working tree at '/home/jlewismoss/projects/metonymy/trunk'.
Checking branch at 'file:///home/jlewismoss/projects/metonymy/trunk/'.
Checking repository at 'file:///home/jlewismoss/projects/metonymy/trunk/'.
bzr: ERROR: exceptions.AssertionError: no parent entry for: django/src/django_extensions/admin in tree 0

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 3138, in run
    check_dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree)
  File "/usr/lib/python2.5/site-packages/bzrlib/check.py", line 456, in check_dwim
    check_repo=do_repo)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2766, in check
    check_repo=check_repo)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2770, in _check
    result.check(callback_refs)
  File "/usr/lib/python2.5/site-packages/bzrlib/check.py", line 146, in check
    item._check(refs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 2568, in _check
    self._validate()
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1262, in _validate
    self._dirstate._validate()
  File "/usr/lib/python2.5/site-packages/bzrlib/dirstate.py", line 3012, in _validate
    check_valid_parent()
  File "/usr/lib/python2.5/site-packages/bzrlib/dirstate.py", line 2946, in check_valid_parent
    % (this_path, tree_index))
AssertionError: no parent entry for: django/src/django_extensions/admin in tree 0

bzr 2.0.0 on python 2.5.4 (Linux-2.6.30-2-amd64-x86_64-with-debian-squeeze-sid)
arguments: ['/usr/bin/bzr', 'check']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  automirror /home/jlewismoss/.bazaar/plugins/automirror [0.0.2]
  avahi /usr/lib/python2.5/site-packages/bzrlib/plugins/avahi [0.3.0dev]
  builddeb /usr/lib/python2.5/site-packages/bzrlib/plugins/builddeb [0.95.0dev]
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  cvsps_import /usr/lib/python2.5/site-packages/bzrlib/plugins/cvsps_import [unknown]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [0.1.0dev]
  email /usr/lib/python2.5/site-packages/bzrlib/plugins/email [unknown]
  etckeeper /usr/lib/python2.5/site-packages/bzrlib/plugins/etckeeper [unknown]
  fastimport /usr/lib/python2.5/site-packages/bzrlib/plugins/fastimport [0.9.0dev]
  git /usr/lib/python2.5/site-packages/bzrlib/plugins/git [0.4.1]
  gtk /home/jlewismoss/.bazaar/plugins/gtk [0.98.0dev1]
  hg /usr/lib/python2.5/site-packages/bzrlib/plugins/hg [0.1.0dev]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [2.0.0]
  loggerhead /usr/lib/python2.5/site-packages/bzrlib/plugins/loggerhead [1.17.0]
  loom /usr/lib/python2.5/site-packages/bzrlib/plugins/loom [1.4.0dev]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [2.0.0]
  search /usr/lib/python2.5/site-packages/bzrlib/plugins/search [1.7.0dev]
  stats /usr/lib/python2.5/site-packages/bzrlib/plugins/stats [unknown]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [1.0.0]
  upload /usr/lib/python2.5/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /usr/lib/python2.5/site-packages/bzrlib/plugins/xmloutput [0.8.5]

*** 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.
-----------------------------------------------------------------------------------------------------------------------------

"bzr mkdir src/foo" seems to have made the problem go away now.

Martin Pool (mbp) on 2009-11-26
summary: - Added some files. Decided to move to subdir before commit. Error
+ NoneType is unsubscriptable in
+ _dirstate_helpers_pyx.ProcessEntryC._process_entry
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Martin Pool (mbp) on 2010-04-01
Changed in bzr:
assignee: nobody → Martin Pool (mbp)
Jelmer Vernooij (jelmer) on 2011-02-01
tags: added: dirstate
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers