ProgrammingError: sync tomboy => folder

Bug #371175 reported by tb
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Conduit
Won't Fix
Critical
conduit (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: conduit

[This was fixed upstream, please add the fix to Ubuntu]

My conduit setup is: tomboy notes ==> folder ("/tmp/1")
I have a single tomboy note (see attached note file). It contains only a title with three non-latin letters.

When selecting synchronize group I get:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/var/lib/python-support/python2.6/conduit/Database.py", line 304, in run
    self.cur.execute(req, args)
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

$ aptitude show conduit
Package: conduit
State: installed
Automatically installed: no
Version: 0.3.15-1ubuntu3

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

=== entire conduit output ================
$conduit
[Main ][INFO ] Conduit v0.3.15 Installed: True (Main.py:99)
[Main ][INFO ] Python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] (Main.py:100)
[Main ][INFO ] Platform Implementations: GIO,webkit,GConf (Main.py:101)
[Main ][INFO ] Using UI: gtk (Main.py:131)
[gtkui.Canvas ][INFO ] Module Information: goocanvas v(0, 12, 0) (/var/lib/python-support/python2.6/goocanvasmodule.so) (Canvas.py:25)
[modules.AVConverter ][INFO ] Module Information: gst v(0, 10, 14) (/usr/lib/python2.6/dist-packages/gst-0.10/gst/__init__.pyc) (AudioVideoConverterModule.py:23)
/usr/lib/conduit/modules/FlickrModule/flickrapi/__init__.py:45: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
[modules.Flickr ][INFO ] Module Information: flickrapi v1.1 (/usr/lib/conduit/modules/FlickrModule/flickrapi/__init__.pyc) (FlickrModule.py:26)
[modules.Feed ][INFO ] Module Information: feedparser v4.1 (/var/lib/python-support/python2.6/feedparser.py) (FeedModule.py:20)
[modules.Feed ][INFO ] Patching feedparser issue #100 (FeedModule.py:26)
[modules.Facebook ][INFO ] Module Information: pyfacebook v0.1 (/usr/lib/conduit/modules/FacebookModule/pyfacebook/__init__.pyc) (FacebookModule.py:30)
[modules.Google ][INFO ] Module Information: gdata (/usr/lib/conduit/modules/GoogleModule/gdata/__init__.pyc) (GoogleModule.py:45)
[modules.Evolution ][INFO ] Module Information: evolution v(2, 26, 0) (/var/lib/python-support/python2.6/gtk-2.0/evolution/__init__.pyc) (EvolutionModule.py:25)
[modules.Backpack ][INFO ] Module Information: backpack (/usr/lib/conduit/modules/BackpackModule/backpack/backpack.pyc) (BackpackModule.py:22)
[modules.Network ][INFO ] Network support enabled (NetworkModule.py:30)
[modules.Network ][DEBUG ] Starting AvahiAdvertiser server (Server.py:35)
[modules.Network ][DEBUG ] Announcing avahi conduit service (Peers.py:159)
[modules.iPod ][INFO ] Module Information: gpod v(0, 7, 0) (/usr/lib/python2.6/dist-packages/gpod/__init__.pyc) (iPodModule.py:43)
[dataproviders.VolumeFactory][DEBUG ] Adjusted mount: file:/// (VolumeFactory.py:25)
[dataproviders.VolumeFactory][DEBUG ] Adjusted mount: file:/// (VolumeFactory.py:25)
[gtkui.UI ][INFO ] Main window constructed (thread: -1209334080) (UI.py:202)
[SyncSet ][INFO ] Restoring Sync Set from /home/kde-devel/.config/conduit/settings.xml (SyncSet.py:195)
[SyncSet ][DEBUG ] Restoring TomboyNoteTwoWay to (source=True) (SyncSet.py:60)
[Conduit ][DEBUG ] Adding twoway dataprovider into source position (Conduit.py:140)
[SyncSet ][DEBUG ] Restoring FolderTwoWay to (source=False) (SyncSet.py:60)
[Conduit ][DEBUG ] Adding twoway dataprovider into sink position (Conduit.py:146)
[gtkui.UI ][DEBUG ] Presenting GUI (UI.py:227)
[DBus ][DEBUG ] DBus Exported: / (DBus.py:127)
[DBus ][DEBUG ] DBus Exported: /syncset/gui (DBus.py:127)
[DBus ][DEBUG ] DBus Exported: /syncset/dbus (DBus.py:127)
[DBus ][DEBUG ] DBus Message from /syncset/gui: Emmiting DBus signal ConduitAdded (DBus.py:134)
[Syncronization ][DEBUG ] Created thread <SyncWorker(Thread-3, initial)> (thread: -1209334080) (Synchronization.py:211)
[Syncronization ][INFO ] Setting global cancel flag (Synchronization.py:90)
[Syncronization ][DEBUG ] Starting worker: <SyncWorker(Wrapper: Tomboy Notes twoway (UID: TomboyNoteTwoWay-kde-devel@tal-desktop) |--> [<conduit.ModuleWrapper.ModuleWrapper instance at 0xa4643ac>], initial)> (Synchronization.py:93)
[Syncronization ][DEBUG ] Started thread <SyncWorker(Wrapper: Tomboy Notes twoway (UID: TomboyNoteTwoWay-kde-devel@tal-desktop) |--> [<conduit.ModuleWrapper.ModuleWrapper instance at 0xa4643ac>], started -1277572208)> (thread: -1277572208) (Synchronization.py:624)
[Syncronization ][DEBUG ] Sync <SyncWorker(Wrapper: Tomboy Notes twoway (UID: TomboyNoteTwoWay-kde-devel@tal-desktop) |--> [<conduit.ModuleWrapper.ModuleWrapper instance at 0xa4643ac>], started -1277572208)> beginning. Slow: False, Twoway: False (Synchronization.py:629)
[Syncronization ][DEBUG ] Syncworker state 0 (Synchronization.py:648)
[platform.FileGio ][INFO ] Standard Attributes: standard::content-type,standard::name,standard::type,standard::size,standard::allocated-size,standard::display-name,standard::edit-name,standard::copy-name,standard::icon,standard::fast-content-type (FileGio.py:26)
[platform.FileGio ][INFO ] Time Attributes: time::modified,time::modified-usec,time::access,time::access-usec,time::changed,time::changed-usec (FileGio.py:26)
[Syncronization ][DEBUG ] Syncworker state 1 (Synchronization.py:648)
[Syncronization ][DEBUG ] Source Status = Ready (Synchronization.py:677)
[modules.Tomboy ][INFO ] Using Tomboy Version (0, 14, 0) (TomboyModule.py:139)
[platform.FileGio ][DEBUG ] 0 files loaded (FileGio.py:361)
[Syncronization ][DEBUG ] Syncworker state 2 (Synchronization.py:648)
[Syncronization ][INFO ] Synchronizing Wrapper: Tomboy Notes twoway (UID: TomboyNoteTwoWay-kde-devel@tal-desktop) |--> Wrapper: 1 twoway (UID: FolderTwoWay-file:///tmp/1) (Synchronization.py:467)
[DeltaProvider ][INFO ] Delta: Source (TomboyNoteTwoWay-kde-devel@tal-desktop) does not implement get_changes(). Proxying... (DeltaProvider.py:25)
[DeltaProvider ][DEBUG ] Delta: Got 1 items
[u'note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d'] (DeltaProvider.py:39)
[DeltaProvider ][DEBUG ] Delta: Expecting 0 items (DeltaProvider.py:49)
[Syncronization ][DEBUG ] TomboyNoteTwoWay-kde-devel@tal-desktop Changes: New 1 items
[u'note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d'] (Synchronization.py:241)
[Syncronization ][DEBUG ] TomboyNoteTwoWay-kde-devel@tal-desktop Changes: Modified 0 items
[] (Synchronization.py:242)
[Syncronization ][DEBUG ] TomboyNoteTwoWay-kde-devel@tal-desktop Changes: Deleted 0 items
[] (Synchronization.py:243)
[modules.Tomboy ][DEBUG ] Getting note: note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d (TomboyModule.py:170)
[Syncronization ][DEBUG ] 1WAY PUT: Tomboy Notes (note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d) -----> 1 (Synchronization.py:489)
[datatypes.DataType ][DEBUG ] Getting Rid for note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d (DataType.py:151)
[TypeConverter ][DEBUG ] Convert note/tomboy -> file using [('note/tomboy', 'file', {})] (TypeConverter.py:209)
[TypeConverter ][DEBUG ] Converting note/tomboy -> file (args: {}) (TypeConverter.py:171)
[datatypes.File ][DEBUG ] New tempfile created at /tmp/conduitHKqyIm (File.py:475)
[datatypes.File ][DEBUG ] Defering rename till transfer (New name: אבג) (File.py:82)
[datatypes.File ][DEBUG ] Defering rename till transfer (New name: אבג.xml) (File.py:82)
[datatypes.File ][DEBUG ] Defering new mtime till transfer (New mtime: 2009-05-03 12:31:29) (File.py:93)
[Syncronization ][INFO ] Putting data note://tomboy/b0f225c4-518b-44d8-999b-05737587bf0d --> None into FolderTwoWay-file:///tmp/1 (Synchronization.py:37)
[dataproviders.File ][DEBUG ] No basepath. Going to empty dir (File.py:285)
[datatypes.File ][DEBUG ] Using deferred filename in transfer (File.py:247)
[platform.FileGio ][DEBUG ] Transfering File file:///tmp/conduitHKqyIm -> file:///tmp/1/%D7%90%D7%91%D7%92.xml (overwrite: False) (FileGio.py:253)
[datatypes.File ][DEBUG ] Clearing pending rename (File.py:65)
[datatypes.File ][DEBUG ] Clearing pending mtime (File.py:68)
[datatypes.DataType ][DEBUG ] Getting Rid for file:///tmp/1/אבג.xml (DataType.py:151)
[platform.FileGio ][INFO ] Standard Attributes: standard::content-type,standard::name,standard::type,standard::size,standard::allocated-size,standard::display-name,standard::edit-name,standard::copy-name,standard::icon,standard::fast-content-type (FileGio.py:26)
[platform.FileGio ][INFO ] Time Attributes: time::modified,time::modified-usec,time::access,time::access-usec,time::changed,time::changed-usec (FileGio.py:26)
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/var/lib/python-support/python2.6/conduit/Database.py", line 304, in run
    self.cur.execute(req, args)
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
====================================

I tested with conduit git repo and the bug was Fixed.
I used version:
  commit 771b08340ff46bfc468ba8d77d0b4eb52399a483
  Author: Alexandre Rosenfeld <email address hidden>
  Date: Fri May 1 22:48:41 2009 -0300

Related branches

Revision history for this message
tb (tal-bav) wrote :
Revision history for this message
MT (micdhack) wrote :

Can you please report where did you find the git repository for conduit?
I went to http://www.conduit-project.org/ and used the latest svn version and the problem still persists with Greek, Czech, and Japanese characters although i believe that it wont work with any unicode characters that are not English.
At least for the svn repository the problem isnt fixed

Revision history for this message
Alexandre Rosenfeld (airmind) wrote :

Conduit has moved to Git with the Gnome transition. The Conduit website isnt updated yet. The Git repository for Conduit is availiable at http://git.gnome.org/cgit/conduit/
Some kind of recent packages are availiable at https://launchpad.net/~conduit/+archive/ppa
I believe the above bug has been corrected in development versions, but I cannot verify at the moment.

Revision history for this message
MT (micdhack) wrote :

Problem persists with the latest git. Unless it is fixed the application is useless with multilingual systems

Here is part the error message:
[Syncronization ][DEBUG ] FolderTwoWay-smb://micdhack-laptop/micdhack/Opf/Favorites Changes: Modified 0 items
[] (Synchronization.py:248)
[Syncronization ][DEBUG ] FolderTwoWay-smb://micdhack-laptop/micdhack/Opf/Favorites Changes: Deleted 0 items
[] (Synchronization.py:249)
[Syncronization ][DEBUG ] 1WAY PUT: Folder (smb://micdhack-laptop/micdhack/Opf/Favorites/ModalBox — An easy way to create popups and wizards.url) -----> Folder (Synchronization.py:495)
[datatypes.DataType ][DEBUG ] Getting Rid for smb://micdhack-laptop/micdhack/Opf/Favorites/ModalBox — An easy way to create popups and wizards.url (DataType.py:158)
[TypeConverter ][DEBUG ] Convert file -> file using [('file', 'file', {})] (TypeConverter.py:209)
[TypeConverter ][DEBUG ] Skipping file -> file (TypeConverter.py:168)
[datatypes.File ][DEBUG ] Setting mtime of smb://micdhack-laptop/micdhack/Opf/Favorites/ModalBox%20%E2%80%94%20An%20easy%20way%20to%20create%20popups%20and%20wizards.url to 1192986175 (<type 'long'>) (File.py:115)
[Syncronization ][INFO ] Putting data smb://micdhack-laptop/micdhack/Opf/Favorites/ModalBox — An easy way to create popups and wizards.url --> None into FolderTwoWay-file:///home/micdhack/Opf/Favorites (Synchronization.py:37)
[dataproviders.File ][DEBUG ] Relative path: ModalBox — An easy way to create popups and wizards.url (File.py:290)
[dataproviders.File ][DEBUG ] Found corresponding group (File.py:292)
[platform.FileGio ][DEBUG ] Transfering File smb://micdhack-laptop/micdhack/Opf/Favorites/ModalBox%20%E2%80%94%20An%20easy%20way%20to%20create%20popups%20and%20wizards.url -> file:///home/micdhack/Opf/Favorites/ModalBox%20%E2%80%94%20An%20easy%20way%20to%20create%20popups%20and%20wizards.url (overwrite: False) (FileGio.py:247)
[datatypes.DataType ][DEBUG ] Getting Rid for file:///home/micdhack/Opf/Favorites/ModalBox — An easy way to create popups and wizards.url (DataType.py:158)
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "/home/micdhack/Desktop/Downloads/conduitgit/conduit/Database.py", line 304, in run
    self.cur.execute(req, args)
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

Changed in conduit:
status: Unknown → Confirmed
Revision history for this message
Julien Lavergne (gilir) wrote :

I uploaded to my PPA (https://launchpad.net/~gilir/+archive/updates) a possible fix for this problem (conduit - 0.3.16-0ubuntu3). Please test with this package and report back if the problem is still here or not.

Julien Lavergne (gilir)
Changed in conduit (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
MT (micdhack) wrote :

i have problem installing the deb package cause i have a version error for
python-support (>= 0.90.0)

micdhack@micdhack-laptop:~$ sudo apt-cache policy python-support
python-support:
  Instalovaná verze: 0.8.7ubuntu4
  Kandidát: 0.8.7ubuntu4
  Tabulka verzí:
 *** 0.8.7ubuntu4 0
        500 http://cz.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Julien Lavergne (gilir) wrote :

@Michael
Thanks for the test. I uploaded a version for Jaunty, please use this line for the PPA : deb http://ppa.launchpad.net/gilir/updates/ubuntu jaunty main
It should be available in a few minutes and avoid this problem of depends.

Revision history for this message
MT (micdhack) wrote :

I tested the package and transfered successfully greek and japanese characters. I think that fixed the problem for every language.
It would be good if the fix could be incorporated in Karmic.
Thank you very much :)

Revision history for this message
Julien Lavergne (gilir) wrote :

Thanks for the tests. There is very good chances that this fix will be include in Karmic (or maybe better fixes form upstream).

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

This bug was fixed in the package conduit - 0.3.16-0ubuntu3

---------------
conduit (0.3.16-0ubuntu3) karmic; urgency=low

  * debian/patches
   - 07-programming-error-unicode.dpatch: Fix unicode convertion with python2.6
    (LP: #371175).
   - 08-escaping-caracters.dpatch: Add uri escaping to handle '#' characters
    (LP: #297085).

 -- Julien Lavergne <email address hidden> Sun, 30 Aug 2009 13:35:15 +0200

Changed in conduit (Ubuntu):
status: Confirmed → Fix Released
Changed in conduit:
importance: Unknown → Critical
Changed in conduit:
status: Confirmed → Won't Fix
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.