[Zope-DB] ZPygreSQL and empty columns

Matthew T. Kromer matt@zope.com
Wed, 19 Sep 2001 07:17:48 -0400


Hi, I'd normally clip the traceback, but in this case, what it is telling m=
e
is not so much that the field contains a NULL value (which is OK) but that
you are depending on the value being not NULL, because you are using it
inside a Zope user folder.

What I cant say for sure is whether or not its in the DA or your User folde=
r
-- Maybe someone who is more familar with ZPyGreSQLDA can answer?  My guess
would be that the DA has some bit where it is skipping columns which are
NULL instead of treating them as None.


on 9/19/01 5:22 AM, Florian Schuler at florian.schuler@braunconsulting.de
wrote:

>=20
> Hello List,
>=20
> I posted yesterday because of my problem with the Zopeproduct
> 'Proiektor'. I=B4ve thought that the errors belong the ZPyGreSQL DA.
> Today, I found out that these error Messages only occures if a field
> (column) in a table is empty.
>=20
> For example: select * from person; -- Error
>=20
> if I fill up all empty tables and do a select * no error occures
>=20
> Is there a special option for PostGres to beware of this error.
>=20
> Thnks in advance
>=20
> Florian
>=20
>=20
>=20
> Table person:
> ---------------
>=20
> id | email | password  | containertype | phone | comments | firstname |
> lastname | middlename | title |            roles
> | containerid | username
> ----+-------+-----------+---------------+-------+----------+-----------+
> ----------+------------+-------
> +-----------------------------+-------------+-----------
> 1 |       | proiektor | PersonGroup   |       |          |           |
> |            | GOD   |
>=20
> ManageGroups,ManageProjects |           1 | proiektor
> (1 row)
>=20
>=20
> Error Type: KeyError
> Error Value: errorvonFlo
> ...
>=20
> Traceback (innermost last):
> File /usr/lib/Zope-2.3.3-src/lib/python/ZPublisher/Publish.py, line
> 223, in publish_module
> File /usr/lib/Zope-2.3.3-src/lib/python/ZPublisher/Publish.py, line
> 187, in publish
> File /usr/lib/Zope-2.3.3-src/lib/python/Zope/__init__.py, line 221,
> in
> zpublisher_exception_hook
> (Object: Traversable)
> File /usr/lib/Zope-2.3.3-src/lib/python/ZPublisher/Publish.py, line
> 171, in publish
> File /usr/lib/Zope-2.3.3-src/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
> (Object: loginAction)
> File /usr/lib/Zope-2.3.3-src/lib/python/ZPublisher/Publish.py, line
> 112, in call_object
> (Object: loginAction)
> File /usr/lib/Zope-2.3.3-src/lib/python/OFS/DTMLMethod.py, line 189,
> in __call__
> (Object: loginAction)
> File
> /usr/lib/Zope-2.3.3-src/lib/python/DocumentTemplate/DT_String.py,
> line 540, in __call__
> (Object: loginAction)
> File /usr/lib/Zope-2.3.3-src/lib/python/DocumentTemplate/DT_Try.py,
> line 215, in render
> File /usr/lib/Zope-2.3.3-src/lib/python/DocumentTemplate/DT_Try.py,
> line 224, in render_try_except
> File /usr/lib/Zope-2.3.3-src/lib/python/DocumentTemplate/DT_Util.py,
> line 339, in eval
> (Object: acl_users.validate(REQUEST))
> (Info: acl_users)
> File <string>, line 0, in ?
> File
>=20
> /usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
> py, line 74, in validate
> (Object: Traversable)
> File
>=20
> /usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
> py, line 121, in cookieValidate
> (Object: Traversable)
> File
>=20
> /usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
> py, line 60, in getUser
> (Object: Traversable)
> File /usr/lib/Zope-2.3.3-src/lib/python/Shared/DC/ZRDB/DA.py, line
> 489, in __call__
> (Object: qry_getPersonWithUserName)
> File /usr/lib/Zope-2.3.3-src/lib/python/Products/ZPyGreSQLDA/db.py,
> line 206, in query
> KeyError: (see above)
>=20
>=20
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>=20