Different versions of ctypes

Bug #285411 reported by Emanuel Steen
10
Affects Status Importance Assigned to Milestone
ctypes (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I run elisa I get an exception as follows:

WARN MainThread gst_metadata_slave_process_protocol okt 18 12:07:01 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/elisa/plugins/amp/slave.py", line 19, in <module>
    sys.exit(main())
  File "/usr/lib/python2.5/site-packages/elisa/plugins/amp/slave.py", line 10, in main
    runner = namedAny(runner)
  File "/usr/lib/python2.5/site-packages/twisted/python/reflect.py", line 426, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/usr/lib/python2.5/site-packages/twisted/python/reflect.py", line 377, in _importAndCheckStack
    return __import__(importName)
  File "/usr/lib/python2.5/site-packages/elisa/plugins/gstreamer/amp_slave.py", line 23, in <module>
    from elisa.plugins.gstreamer.amp_protocol import GstMetadataSlaveFactory
  File "/usr/lib/python2.5/site-packages/elisa/plugins/gstreamer/amp_protocol.py", line 22, in <module>
    from twisted.protocols.amp import Command, String, AmpList, Integer, Float
  File "/usr/lib/python2.5/site-packages/twisted/protocols/amp.py", line 168, in <module>
    from twisted.python import log, filepath
  File "/usr/lib/python2.5/site-packages/twisted/python/filepath.py", line 29, in <module>
    from twisted.python.win32 import ERROR_FILE_NOT_FOUND, ERROR_PATH_NOT_FOUND
  File "/usr/lib/python2.5/site-packages/twisted/python/win32.py", line 160, in <module>
    formatError = _ErrorFormatter.fromEnvironment().formatError
  File "/usr/lib/python2.5/site-packages/twisted/python/win32.py", line 120, in fromEnvironment
    from ctypes import WinError
  File "/usr/lib/python2.5/site-packages/ctypes/__init__.py", line 20, in <module>
    raise Exception, ("Version number mismatch", __version__, _ctypes_version)

This exception is raised from within ctypes and it seems like the /usr/lib/python2.5/lib-dynload/_ctypes.so file from the package python2.5 and the file /usr/share/pyshared/ctypes/__init__.py (/usr/lib/python2.5/site-packages/ctypes/__init__.py is a symbolic link to that file) from python-ctypes has different versions.

The python2.5 package is version 2.5.2-11.1ubuntu1
The python-ctypes is version 1.0.2-5ubuntu2

/usr/share/pyshared/ctypes/__init__.py sets:
__version__ = "1.0.2"

While in the shared object file _ctypes.so:
$> grep 1.0.2 /usr/lib/python2.5/lib-dynload/_ctypes.so
 - gives no match
$> grep 1.0.3 /usr/lib/python2.5/lib-dynload/_ctypes.so
Binary file /usr/lib/python2.5/lib-dynload/_ctypes.so matches

Revision history for this message
wvengen (wvengen) wrote :

I confirm the difference in version numbers:
  $ grep ^__version__ /usr/share/pyshared/ctypes/__init__.py
  __version__ = "1.0.2"
  $ strings /usr/lib/python*/lib-dynload/_ctypes.so | grep 1\.\0\.
  1.0.3
although I don't have a problem with ctypes
  $ python -c 'import ctypes'; echo ${?}
  0
  $ python -v -c 'import ctypes' 2>&1 | grep ctypes
  import ctypes # directory /usr/lib/python2.5/ctypes
  # /usr/lib/python2.5/ctypes/__init__.pyc matches /usr/lib/python2.5/ctypes/__init__.py
  import ctypes # precompiled from /usr/lib/python2.5/ctypes/__init__.pyc
  dlopen("/usr/lib/python2.5/lib-dynload/_ctypes.so", 2);
  import _ctypes # dynamically loaded from /usr/lib/python2.5/lib-dynload/_ctypes.so
  # /usr/lib/python2.5/ctypes/_endian.pyc matches /usr/lib/python2.5/ctypes/_endian.py
  import ctypes._endian # precompiled from /usr/lib/python2.5/ctypes/_endian.pyc
  # cleanup[1] _ctypes
  # cleanup[1] ctypes
  # cleanup[1] ctypes._endian
I have the same package versions as the submitter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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