[PEAK] bulletins example OF DOOM

Stephen Waterbury golux at comcast.net
Fri Apr 9 20:25:40 EDT 2004


Phillip J. Eby wrote:

> ... it's an issue with the DBAPI module, as you can see below:
> 
>> AttributeError: 'module' object has no attribute 'DATE'

> Check the 'supportedTypes' list you've defined (or inherited).  It seems 
> you've subclassed from a connection type for a Postgres driver with a 
> 'DATE' type, but the driver you're using either doesn't support it, or 
> calls it something else.  (Welcome to the wonderful world of Python 
> DBAPI implementations.)

I went back and changed 'DATE' in my
p.storage.SQL.pyPgSQLConnection.supportedTypes
(which I had copied from PsycopgConnection)
to 'Date' (as it's spelled in the DBAPI spec), and
sure enough, I got a different traceback.
Progress ... :)

- Steve
-------------- next part --------------
[waterbug at bigboote bulletins]$ peak runIni bulletins showusers
User          Name
------------  -----------------------------------
Traceback (most recent call last):
  File "/usr/local/bin/peak", line 4, in ?
    commands.runMain( commands.Bootstrap )
  File "/usr/local/lib/python2.3/site-packages/peak/running/commands.py", line 70, in runMain
    result = factory().run()
  File "/home/waterbug/sandbox/PEAKsb/bulletins/src/bulletins/commands.py", line 48, in run
    for user in self.Users.getAll():
  File "/home/waterbug/sandbox/PEAKsb/bulletins/src/bulletins/storage.py", line 72, in getAll
    return [self.preloadState(row.loginId, self.stateFromRow(row))
  File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 184, in __iter__
    converter = self.conn.getRowConverter(descr,mkTuple)
  File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 291, in getRowConverter
    typeMap = self.typeMap
  File "C:\cygwin\home\pje\PEAK\src/peak/binding/_once.pyx", line 112, in _once.BaseDescriptor.__get__
  File "C:\cygwin\home\pje\PEAK\src/peak/binding/_once.pyx", line 100, in _once.__get__
  File "/usr/local/lib/python2.3/site-packages/peak/binding/once.py", line 498, in <lambda>
    f = lambda s,d,a: func(s)
  File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 354, in typeMap
    for v in getattr(api,k).values:
AttributeError: 'builtin_function_or_method' object has no attribute 'values'
Segmentation fault



More information about the PEAK mailing list