Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8207 closed (fixed)

Tests fail without ctypes on Python 2.4

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

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

Attachments (0)

Change History (6)

comment:1 Changed 6 years ago by jbronn

  • Keywords gis tests ctypes added
  • milestone changed from 1.0 to 1.0 beta
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jbronn
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Summary changed from Tests fail without ctypes to Tests fail without ctypes on Python 2.4
  • Triage Stage changed from Unreviewed to Accepted

comment:2 follow-up: Changed 6 years ago by Karen Tracey <kmtracey@…>

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 Changed 6 years ago by jbronn

  • Resolution set to fixed
  • Status changed from assigned to closed

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

comment:4 in reply to: ↑ 2 Changed 6 years ago by jbronn

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 Changed 6 years ago by Karen Tracey <kmtracey@…>

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

comment:6 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.