#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 , 17 years ago
| Keywords: | gis tests ctypes added |
|---|---|
| milestone: | 1.0 → 1.0 beta |
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | Tests fail without ctypes → Tests fail without ctypes on Python 2.4 |
| Triage Stage: | Unreviewed → Accepted |
follow-up: 4 comment:2 by , 17 years ago
comment:3 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 17 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.
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 _ctypesActually 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.