TypeError: Expected a plain str for value not: <type 'unicode'> in bzrlib._btree_serializer_pyx._flatten_node during commit

Bug #519247 reported by AbstractCoder
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr search plugin
Incomplete
Undecided
Unassigned

Bug Description

I was working through the user guide and was on the section "Personal version control". I had used the "Starting a new project" section with bzr init-repo.

I had got as far as the "Undoing mistakes" with no problems. But once I attempted the commit in this section:

bzr add TODO
bzr commit -m "added TODO"
(hack, hack, hack - but don't change TODO)
bzr remove TODO
(TODO file deleted)

I got the error when using this command: bzr commit -m "added a file"

For my testing I had been using slightly different names and the text changes I made.

After getting the error I could just "bzr update" and the branch seems to contain the commit with no other problems. Then I created a new branch my.main2 and tested and this one works fine. But the first one: my.main still causes the error.

attached are all the crash reports I got while testing it and the section of my log file from today.

I have only just started learning Bazaar so sorry if I have missed something. I had a search around and could not find any other references of this problem.

---

 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
     return self.run(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3058, in run
     exclude=safe_relpath_files(tree, exclude))
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 197, in commit
     result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 229, in commit
     *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 396, in commit
     self.branch.set_last_revision_info(new_revno, self.rev_id)
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2501, in set_last_revision_info
     self._run_post_change_branch_tip_hooks(old_revno, old_revid)
   File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 1081, in _run_post_change_branch_tip_hooks
     hook(params)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/__init__.py", line 59, in auto_index_branch
     search_index.index_branch(result.branch, result.new_revid)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 321, in index_branch
     self.index_revisions(branch, revs_to_index)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 336, in index_revisions
     outer_bar)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 384, in _index_revisions
     self._add_index(builder)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 397, in _add_index
     self._upload_transport)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 1113, in upload_index
     "documents", writer)
   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 996, in _add_index_to_pack
     index_file = index.finish()
   File "/usr/lib/python2.6/dist-packages/bzrlib/btree_index.py", line 425, in finish
     return self._write_nodes(self.iter_all_entries())[0]
   File "/usr/lib/python2.6/dist-packages/bzrlib/btree_index.py", line 377, in _write_nodes
     self.reference_lists)
   File "_btree_serializer_pyx.pyx", line 372, in bzrlib._btree_serializer_pyx._flatten_node
 TypeError: Expected a plain str for value not: <type 'unicode'>

Revision history for this message
AbstractCoder (dev-abstractcoder) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

This seems to be a bug in the bzr-search plugin. If you uninstall it you should be able to continue.

description: updated
summary: - commit causes TypeError exception when going through the user guide
+ TypeError: Expected a plain str for value not: <type 'unicode'> during
+ commit
summary: - TypeError: Expected a plain str for value not: <type 'unicode'> during
- commit
+ TypeError: Expected a plain str for value not: <type 'unicode'> in
+ bzrlib._btree_serializer_pyx._flatten_node during commit
affects: bzr → bzr-search
Revision history for this message
Robert Collins (lifeless) wrote :

What does "dpkg -l bzr-search" report

thanks,
Rob

Changed in bzr-search:
status: New → Incomplete
Revision history for this message
AbstractCoder (dev-abstractcoder) wrote :

Result of command before uninstall:

steve@mainpc:~$ dpkg -l bzr-search
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii bzr-search 1.7.0~bzr70-1 search plugin for Bazaar
steve@mainpc:~$

Result of command after uninstall:

steve@mainpc:~$ dpkg -l bzr-search
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=================================-=================================-==================================================================================
un bzr-search <none> (no description available)
steve@mainpc:~$

Removing the bzr-search did sort it out.

Thanks for the help,

Steve

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.