[ooo-build] uno.py incompatible with python 2.6 / Type error when using "encode"

Bug #346443 reported by Knut
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenOffice
Fix Released
Unknown
openoffice.org (Ubuntu)
Fix Released
High
Chris Cheney

Bug Description

Binary package hint: python-uno

Ubuntu Jaunty Jackalope / 9.04 alpha 6
The python uno-bridge to Openoffice.orgs API is maintained for python 2.3.4. Ubuntu, like other distributions uses more recent python versions instead, python 2.6 since ubuntu 9.04. This can lead to incompatabilities.
The simple python script in the attachment can be stored into /home/<user>/.openoffice.org/3/user/Scripts/python (may have to be created). Then the macro "pyunotest" can be run from within an Ooo-Document with Tools->Macros->Run Macro->My Macros->pyunotest. It will crash and deliver a "Type Error _uno_import() got an unexpected keyword argument 'fromlist'" and a Traceback like
  File "/usr/lib/python2.6/encodings/__init__.py", line 100, in search_function
    level=0),
simply because the "encoding"-method for strings has been used!
The same bug has been reported to opensuse 11.1 and a bug fix has been suggested. See
http://lists.opensuse.org/opensuse-bugs/2008-11/msg13827.html and https://bugzilla.novell.com/show_bug.cgi?id=448776.
The error leads to the crash of many python extensions and scripts, including my own, GnuCash to Ooo (http://extensions.services.openoffice.org/project/gnuc2ooo) and the mailmerge function in OpenOffice (see http://documentation.openoffice.org/manuals/oooauthors/Mail-Merge.pdf), as reported to opensuse. While the importance of my macro is debatable, the mailmerge-function is obviously important for many small businesses and associations.
Kind regards
Knut

Revision history for this message
Knut (knut-gw-hh) wrote :
Chris Cheney (ccheney)
Changed in openoffice.org:
assignee: nobody → ccheney
importance: Undecided → High
milestone: none → ubuntu-9.04
status: New → Triaged
Revision history for this message
Chris Cheney (ccheney) wrote :

Thanks for the great detailed bug report! :-)

I have contacted the Novell developers to determine what is going on with that bug as we use the same ooo-build codebase that they do so why it isn't already fixed is a mystery to me.

Thanks,

Chris

Chris Cheney (ccheney)
summary: - uno.py incompatible with python 2.6 / Type error when using "encode"
+ [ooo-build] uno.py incompatible with python 2.6 / Type error when using
+ "encode"
Changed in openoffice:
status: Unknown → In Progress
Revision history for this message
Knut (knut-gw-hh) wrote :

Another well-established and widely used application that will cease working unless the fix is incorporated seems to be the openoffice integration of zotero (http://www.zotero.org/). See this bug report: http://forums.zotero.org/discussion/4967/installation-error-with-openoffice-30/.

Chris Cheney (ccheney)
Changed in openoffice.org (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openoffice.org - 1:3.0.1-9ubuntu1

---------------
openoffice.org (1:3.0.1-9ubuntu1) jaunty; urgency=low

  * Resynchronise with Debian (r1448). Remaining changes:
    - Add Launchpad integration support.
    - Add Launchpad translations support.
    - Add package openoffice.org-style-human.
    - Add some Ubuntu-specific bitmaps. Adjust broffice diversions for these.
    - Add support for compressing debs with lzma.
    - Add support for shared /usr/share/doc directories.
    - Add support to build l10n as a separate source.
    - Add support to build on lpia.
    - Add support to turn off building on sparc.
    - Add Xb-Npp-xxx tags according to "firefox distro add-on suport" spec.
    - Set startcenter.desktop to not display in the menu.
    - Use imagemagick instead of graphicsmagick.
    - openoffice.org-help switch to internal copy of lucene.
    - Disable gnome-vfs support since it is buggy.
    - Correct diversions for broffice.org. (LP: #347144)
    - Drop Pre-Depends lzma. (LP: #353336)
    - Remove hicolor and locolor icons. (LP: #339590)
    - Remove qa packages. (LP: #89005)
    - Switch desktop files from %U to %F for gvfs fuse. (LP: #347209)
    - Update human icon theme. (LP: #348666)
  * Resynchronise with ooo-build-3-0-1 (1bfac2ec2a2557d3388330cf35c821a5876f86e9).
    - Add GSI for ca. (LP: #283772)
    - Add pyuno-python26.diff (LP: #346443)
    - Update GSI from linux.cz for be-BY, bg, et, ga, gd, nb, nn, ro, sk, sl.

 -- Chris Cheney <email address hidden> Mon, 06 Apr 2009 00:25:00 -0500

Changed in openoffice.org (Ubuntu):
status: Fix Committed → Fix Released
Changed in openoffice:
status: In Progress → Fix Released
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.