Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

ZPygreSQL and empty columns

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


florian.schuler at braunconsulting

Sep 19, 2001, 2:22 AM

Post #1 of 2 (473 views)
Permalink
ZPygreSQL and empty columns

Hello List,

I posted yesterday because of my problem with the Zopeproduct
'Proiektor'. I´ve 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.

For example: select * from person; -- Error

if I fill up all empty tables and do a select * no error occures

Is there a special option for PostGres to beware of this error.

Thnks in advance

Florian



Table person:
---------------

id | email | password | containertype | phone | comments | firstname |
lastname | middlename | title | roles
| containerid | username
----+-------+-----------+---------------+-------+----------+-----------+
----------+------------+-------
+-----------------------------+-------------+-----------
1 | | proiektor | PersonGroup | | | |
| | GOD |

ManageGroups,ManageProjects | 1 | proiektor
(1 row)


Error Type: KeyError
Error Value: errorvonFlo
...

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

/usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
py, line 74, in validate
(Object: Traversable)
File

/usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
py, line 121, in cookieValidate
(Object: Traversable)
File

/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)


matt at zope

Sep 19, 2001, 4:17 AM

Post #2 of 2 (451 views)
Permalink
Re: ZPygreSQL and empty columns [In reply to]

Hi, I'd normally clip the traceback, but in this case, what it is telling me
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 folder
-- 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 [at] braunconsulting
wrote:

>
> Hello List,
>
> I posted yesterday because of my problem with the Zopeproduct
> 'Proiektor'. I´ve 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.
>
> For example: select * from person; -- Error
>
> if I fill up all empty tables and do a select * no error occures
>
> Is there a special option for PostGres to beware of this error.
>
> Thnks in advance
>
> Florian
>
>
>
> Table person:
> ---------------
>
> id | email | password | containertype | phone | comments | firstname |
> lastname | middlename | title | roles
> | containerid | username
> ----+-------+-----------+---------------+-------+----------+-----------+
> ----------+------------+-------
> +-----------------------------+-------------+-----------
> 1 | | proiektor | PersonGroup | | | |
> | | GOD |
>
> ManageGroups,ManageProjects | 1 | proiektor
> (1 row)
>
>
> Error Type: KeyError
> Error Value: errorvonFlo
> ...
>
> 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
>
> /usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
> py, line 74, in validate
> (Object: Traversable)
> File
>
> /usr/lib/Zope-2.3.3-src/lib/python/Products/Proiektor/UserFolderSupport.
> py, line 121, in cookieValidate
> (Object: Traversable)
> File
>
> /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)
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB [at] zope
> http://lists.zope.org/mailman/listinfo/zope-db
>

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.