[PEAK] Tracebacks for "showusers" (bulletins OF DOOM, part 2)
Stephen Waterbury
golux at comcast.net
Sat Apr 10 18:28:34 EDT 2004
peak runIni bulletins showusers
... now gives me different tracebacks depending on whether I'm
using pyPgSQL or psycopg (see tracebacks attached).
The pyPgSQL traceback (which I posted earlier) may have something to do
with the fact that pyPgSQL returns a query result as a PgResultSet
object, and that may not be what PEAK is expecting, but I'm not
familiar enough with PEAK to see what it actually does with a result ...
the magic is still opaque to me. :)
The psycopg one complains "argument 3 must be a string, not None",
which I take to mean the 'user' parameter in its connect() method.
I've tried 2 or 3 variations on the syntax spec for GenericSQL_URL;
the one that currently makes most sense to me is:
('//',), (user, (':', passwd), '@'), (server, '/'), db,
And in bulletins, I set
databaseURL = 'psycopg:waterbug at bulletins'
... expecting 'waterbug' to get parsed as the user. Apparently not
(or else something else is the problem).
Thanks for any help!
Cheers,
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
-------------- 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/connections.py", line 265, in __call__
cursor.execute(*args)
File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 138, in execute
return self._cursor.execute(*args)
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 50, in <lambda>
_cursor = binding.Make(lambda self: self._conn.cursor())
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/components.py", line 524, in computeValue
return self.targetName.findComponent(obj, self.default)
File "/usr/local/lib/python2.3/site-packages/peak/binding/components.py", line 308, in findComponent
else: ob = getattr(ob,attr)
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/connections.py", line 172, in <lambda>
connection = binding.Make(lambda self: self._open())
File "/usr/local/lib/python2.3/site-packages/peak/storage/SQL.py", line 464, in _open
return self.API.connect(
TypeError: argument 3 must be string, not None
More information about the PEAK
mailing list