[Zope-DB] Error on traversing to ZSQL?
Qingliang Li
qlli at ctb.pku.edu.cn
Wed Jul 21 06:48:41 EDT 2004
When I try: http://localhost:8080/employee_by_id/emp_id/42/viewEmployee
The traceback goes like this:
Traceback (innermost last):
Module ZPublisher.Publish, line 91, in publish
Module ZPublisher.BaseRequest, line 361, in traverse
Module Shared.DC.ZRDB.DA, line 575, in __getattr__
KeyError: '_r'
I try to omit "emp_id" and it really works ONLY IF I select the checkbox of "Allow "simple" direct traversal" in the "Advanced" tab of employee_by_id.
But that way I can only traverse one parameter to the Z SQL, that means if the Z SQL contains more than one parameters, this method won't work!
Thanks!
å¨2004å¹´07æ21æ¥ç03:18ï¼Dieter Maureråéï¼
> Qingliang Li wrote at 2004-7-19 11:12 +0800:
> ><>I try a example (Traversing to Result Objects) in the the Chapter
> >--"Relational Database Connectivity" of** The Zope Book (2.6 Edition)
> ><http://zope.org/Documentation/Books/ZopeBook/2_6Edition>
> >**
> >
> >
> >I followed the example step by step, but when I use the traversing:
> >http://localhost:8080/employee_by_id/emp_id/42/viewEmployee
> >
> >I meet the following errors, how can get it? Many Thanks!
> >
> >
> > Site Error
> >
> >An error was encountered while publishing this resource.
> >
> >*Error Type: KeyError*
> >*Error Value: '_r'*
>
> General comment: Whenever you see "Error Type: ..." look at
> the traceback (which you find in your "error_log" object in
> Zope's "Root Folder"). The traceback will tell you where
> the error occured. Local inspection of the relevant code
> often provides valuable clues.
>
> You may try to omit the "emp_id".
> Not sure, whether this will fix your problem.
> Had you posted the traceback, I could have been helpful.
--
Qingliang Li
Center for Theoretical Biology,
Peking University, Beijing,
P.R.China, 100871
Email: qlli at ctb.pku.edu.cn
Tel: +86-010-6275-9669
More information about the Zope-DB
mailing list