Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8207 closed (fixed)

Tests fail without ctypes on Python 2.4

Reported by: Owned by: jbronn
Component: GIS Version: dev
Severity: Keywords: gis tests ctypes
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Output is as follows:

Error while importing gis:  File "./runtests.py", line 130, in django_tests
    mod = load_app(model_label)
  File "/usr/lib/python2.4/site-packages/django/db/models/loading.py", line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/usr/lib/python2.4/site-packages/django/contrib/gis/models.py", line 9, in ?
    from django.contrib.gis.gdal import HAS_GDAL, PYTHON23
  File "/usr/lib/python2.4/site-packages/django/contrib/gis/gdal/__init__.py", line 53, in ?
    from django.contrib.gis.gdal.envelope import Envelope
  File "/usr/lib/python2.4/site-packages/django/contrib/gis/gdal/envelope.py", line 13, in ?
    from ctypes import Structure, c_double
ImportError: No module named ctypes

Tested on r8287, Debian Etch, Python 2.4.4

Change History (6)

comment:1 by jbronn, 16 years ago

Keywords: gis tests ctypes added
milestone: 1.01.0 beta
Owner: changed from nobody to jbronn
Status: newassigned
Summary: Tests fail without ctypesTests fail without ctypes on Python 2.4
Triage Stage: UnreviewedAccepted

comment:2 by Karen Tracey <kmtracey@…>, 16 years ago

I notice you changed the summary to specify Python 2.4. The Python community buildbot running the current Python 2.6 trunk is also seeing a similar failure, this is from the stdio output here: http://www.python.org/dev/buildbot/community/all/?show=sparc%20Solaris%2010%20trunk

Error while importing gis:  File "runtests.py", line 130, in django_tests
    mod = load_app(model_label)
  File "/tmp/python-buildbot/local/lib/python2.6/site-packages/django/db/models/loading.py", line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/tmp/python-buildbot/local/lib/python2.6/site-packages/django/contrib/gis/models.py", line 9, in <module>
    from django.contrib.gis.gdal import HAS_GDAL, PYTHON23
  File "/tmp/python-buildbot/local/lib/python2.6/site-packages/django/contrib/gis/gdal/__init__.py", line 53, in <module>
    from django.contrib.gis.gdal.envelope import Envelope
  File "/tmp/python-buildbot/local/lib/python2.6/site-packages/django/contrib/gis/gdal/envelope.py", line 13, in <module>
    from ctypes import Structure, c_double
  File "/tmp/python-buildbot/local/lib/python2.6/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

Actually now that I look at that cloesely I see it is slightly different. Feedback on what's going on here, if you have any idea, would be appreciated. This does not happen on my test machines running Python 2.6 beta2 so I'm not sure what the difference is and had not started to dig into it at all since I (mistakenly?) thought it would be covered by this ticket.

comment:3 by jbronn, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [8289]) gis: Fixed #8207; now shield 2.4 test runners from attempting to import ctypes.

in reply to:  2 comment:4 by jbronn, 16 years ago

Replying to Karen Tracey <kmtracey@gmail.com>:

Actually now that I look at that cloesely I see it is slightly different. Feedback on what's going on here, if you have any idea, would be appreciated. This does not happen on my test machines running Python 2.6 beta2 so I'm not sure what the difference is and had not started to dig into it at all since I (mistakenly?) thought it would be covered by this ticket.

The fix in 8289 should also apply for the Python 2.6 problem. It looks to me like ctypes isn't installed properly with 2.6. Specifically, it can't find _ctypes, which has C implementations for the ctypes API. This implies it wasn't compiled with or is missing from the 2.6 distribution you're using.

comment:5 by Karen Tracey <kmtracey@…>, 16 years ago

OK, I'll forward that info to the buildbot owner. Thanks.

comment:6 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top