TypeError: value is of the wrong type for this column

Bug #703603 reported by Iain Buclaw
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
meld
Fix Released
Medium
meld (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: meld

Backtrace:

Traceback (most recent call last):
  File "/usr/bin/meld", line 123, in <module>
    main()
  File "/usr/bin/meld", line 116, in main
    app.parse_args(sys.argv[1:])
  File "/usr/lib/meld/meld/meldapp.py", line 621, in parse_args
    tab = self.open_paths(args, options.auto_compare)
  File "/usr/lib/meld/meld/meldapp.py", line 645, in open_paths
    tab = self.append_diff(paths, auto_compare)
  File "/usr/lib/meld/meld/meldapp.py", line 542, in append_diff
    return self.append_dirdiff(paths, auto_compare)
  File "/usr/lib/meld/meld/meldapp.py", line 499, in append_dirdiff
    doc.set_locations(dirs)
  File "/usr/lib/meld/meld/dirdiff.py", line 376, in set_locations
    self._update_item_state(child)
  File "/usr/lib/meld/meld/dirdiff.py", line 812, in _update_item_state
    self.model.set_state(it, j, tree.STATE_NORMAL, isdir)
  File "/usr/lib/meld/meld/tree.py", line 112, in set_state
    self.set_value(it, STATE, state)
TypeError: value is of the wrong type for this column

Always reproducable, just get any diff of 2 directories.

Possibly related is https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/703476 which has been reported in the last 10 hours.

Regards

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: meld 1.4.0-1
ProcVersionSignature: Ubuntu 2.6.37-11.25-generic 2.6.37-rc7
Uname: Linux 2.6.37-11-generic i686
Architecture: i386
Date: Sun Jan 16 16:16:24 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20101202)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 LC_MESSAGES=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: meld

Related branches

Revision history for this message
Iain Buclaw (iainb) wrote :
Revision history for this message
Iain Buclaw (iainb) wrote :

The only notably change to my system since meld stopped working seems to be python-minimal from 2.7.1-0ubuntu4 to 2.7.1-0ubuntu5

Think it's too late to downgrade it though just to be sure...

Regards

Revision history for this message
Iain Buclaw (iainb) wrote :

Lazy fix:

diff -ur /usr/lib/meld/meld.orig/tree.py /usr/lib/meld/meld/tree.py
--- /usr/lib/meld/meld.orig/tree.py 2010-12-13 16:15:35.000000000 +0000
+++ /usr/lib/meld/meld/tree.py 2011-01-16 17:05:25.212220421 +0000
@@ -109,7 +109,7 @@
         STATE = self.column_index(COL_STATE, pane)
         TEXT = self.column_index(COL_TEXT, pane)
         ICON = self.column_index(COL_ICON, pane)
- self.set_value(it, STATE, state)
+ self.set_value(it, STATE, str(state))
         self.set_value(it, TEXT, self.textstyle[state] % name)
         self.set_value(it, ICON, self.pixstyle[state][isdir])

Revision history for this message
Iain Buclaw (iainb) wrote :

More lazy fixes (now loads and functions as I expect for now):

diff -ur /usr/lib/meld/meld.orig/tree.py /usr/lib/meld/meld/tree.py
--- /usr/lib/meld/meld.orig/tree.py 2010-12-13 16:15:35.000000000 +0000
+++ /usr/lib/meld/meld/tree.py 2011-01-16 17:22:40.936220421 +0000
@@ -84,8 +84,8 @@
     def add_empty(self, parent, text="empty folder"):
         child = self.append(parent)
         for i in range(self.ntree):
- self.set_value(child, self.column_index(COL_STATE,i), STATE_EMPTY)
- self.set_value(child, self.column_index(COL_PATH,i), self.pixstyle[STATE_EMPTY])
+ self.set_value(child, self.column_index(COL_STATE,i), str(STATE_EMPTY))
+ self.set_value(child, self.column_index(COL_PATH,i), str(self.pixstyle[STATE_EMPTY]))
             self.set_value(child, self.column_index(COL_TEXT, i), self.textstyle[STATE_EMPTY] % gobject.markup_escape_text(text))
         return child

Regards

tags: added: patch
Iain Buclaw (iainb)
Changed in meld (Ubuntu):
status: New → Confirmed
Revision history for this message
Iain Buclaw (iainb) wrote :

Attaching patch, can someone review/upload?

Can't use meld to compare two directories without this.

Regards

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package meld - 1.5.0-0ubuntu1

---------------
meld (1.5.0-0ubuntu1) natty; urgency=low

  * New upstream release

  [ Iain Buclaw ]
  * debian/patches/diff_tree_store.patch:
    - Fix crash trying to insert integers into a text column (LP: #703603)
 -- Robert Ancell <email address hidden> Wed, 19 Jan 2011 14:50:11 +1100

Changed in meld (Ubuntu):
status: Confirmed → Fix Released
Changed in meld:
importance: Unknown → Medium
status: Unknown → New
Changed in meld:
status: New → In Progress
Changed in meld:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.