[Zope] Problem with ZPsycopgDA

Tino Wildenhain tino at wildenhain.de
Sun Feb 15 04:09:09 EST 2004


Hi kittonian,

kittonian wrote:
> I am running 2.6.2 with python 2.1.3 on this new Debian box we brought two
> days ago.  I have another server running this setup perfectly and for some
> reason I cannot get passed this error.
>  
> Traceback (most recent call last):
>   File "/usr/local/Zope-2.6.2-src/lib/python/OFS/Application.py", line 522,
> in import_product
>     product=__import__(pname, global_dict, global_dict, silly)
>   File "/usr/local/zope/lib/python/Products/ZPsycopgDA/__init__.py", line
> 92, in ?
>     import DA
>   File "/usr/local/zope/lib/python/Products/ZPsycopgDA/DA.py", line 93, in ?
>     from db import DB
>   File "/usr/local/zope/lib/python/Products/ZPsycopgDA/db.py", line 99, in ?
>     import psycopg
> AttributeError: 'DateTime' module has no attribute 'mxDateTimeAPI'
> 
> I have been reading through mailing lists, the FAQ, etc. and nothing is
> solving this problem.  I only have 1 python installed on the system and I
> compiled it by hand.  Zope starts just fine and I can get a python shell
> without issue.
> 
> If I type this command - python -c 'import mx.DateTime; print
> dir(mx.DateTime)'
> I get the following output.
> 
> ['ARPA', 'Age', 'April', 'August', 'Date', 'DateFrom', 'DateFromTicks',
> 'DateTime', 'DateTimeDelta', 'DateTimeDeltaFrom', 'DateTimeDeltaFromDays',
> 'DateTimeDeltaFromSeconds', 'DateTimeDeltaType', 'DateTimeFrom',
> 'DateTimeFromAbsDateTime', 'DateTimeFromAbsDays', 'DateTimeFromCOMDate',
> 'DateTimeFromJDN', 'DateTimeFromMJD', 'DateTimeFromTJD',
> 'DateTimeFromTicks', 'DateTimeType', 'December', 'Epoch', 'Error', 'Feasts',
> 'February', 'Friday', 'Gregorian', 'GregorianDate', 'GregorianDateTime',
> 'ISO', 'January', 'Julian', 'JulianDate', 'JulianDateTime', 'July', 'June',
> 'Locale', 'March', 'MaxDateTime', 'MaxDateTimeDelta', 'May', 'MinDateTime',
> 'MinDateTimeDelta', 'Monday', 'Month', 'NIST', 'November', 'ODMG',
> 'October', 'POSIX', 'Parser', 'RangeError', 'RelativeDate',
> 'RelativeDateDiff', 'RelativeDateTime', 'RelativeDateTimeDiff',
> 'RelativeDateTimeFrom', 'Saturday', 'September', 'Sunday', 'Thursday',
> 'Time', 'TimeDelta', 'TimeDeltaFrom', 'TimeFrom', 'TimeFromTicks',
> 'Timestamp', 'TimestampFrom', 'TimestampFromTicks', 'Tuesday', 'Wednesday',
> 'Weekday', '_DT', '_DTD', '__builtins__', '__doc__', '__file__', '__name__',
> '__path__', '__version__', 'add_century', 'cmp', 'ctime', 'current_myriad',
> 'gm2local', 'gmt', 'gmticks', 'gmtime', 'gregorian_jdn', 'julian_jdn',
> 'local2gm', 'local2utc', 'localtime', 'mktime', 'mxDateTime',
> 'mxDateTimeAPI', 'now', 'oneDay', 'oneHour', 'oneMinute', 'oneSecond',
> 'oneWeek', 'setnowapi', 'strptime', 'today', 'tz_offset', 'utc',
> 'utc2local', 'utcticks', 'utctime']
> 
> Any suggestions would be much appreciated.

Look which version of python your Zope installation actually uses
and if this version comes with mxDateTime and psycopg.

Regards
Tino




More information about the Zope mailing list