psycopg used in a ASP page fails

From: Barend Köbben <kobben(at)itc(dot)nl>
To: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: psycopg used in a ASP page fails
Date: 2011-02-15 11:15:55
Message-ID: C9801EFB.3752%kobben@itc.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi there,

I have the strange case of the same Python code importing psycopg is
failing in an ASP environment while working as stand-alone or CGI
programme:

This is the code:
import psycopg2

This works fine when running in the python IDLE or on the IIS 6.0 server
as a .py CGI script. However, when run as an ASP script (the same code in
between <% %> tags in a .asp file), it fails with this message:

Python ActiveX Scripting Engine error '80020009'
Traceback (most recent call last):
File "<Script Block >", line 4, in <module>
import psycopg2
File "C:\Python27\lib\site-packages\psycopg2\__init__.py", line 65, in
<module>
from psycopg2 import tz
ImportError: cannot import name tz

/~kobben/testDB/testDB.asp, line 10
import psycopg2

Other Python ASP scripts work fine, including ones that import modules, eg:
<%
import sys
Response.Write(sys.version)

%>

I must admit I have no clue as to why this happens...

Yours,
--
Barend Köbben
ITC - University of Twente, Faculty of Geo-Information
Science and Earth Observation
PO Box 217, 7500AE Enschede (The Netherlands)

Faculty of Geo-Information Science and Earth Observation (ITC)
University of Twente
Chamber of Commerce: 501305360000

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2011-02-15 11:52:21 Re: psycopg used in a ASP page fails
Previous Message Daniele Varrazzo 2011-02-15 09:26:00 Re: RELEASE: psycopg 2.4 beta 2