On Sep 28, 5:57 pm, RayLeyva <[EMAIL PROTECTED]> wrote:
> I've read the thread:
>
> http://groups.google.com/group/webpy/browse_thread/thread/5374f00a45b...
>
> It doesn't address the issue I've run headlong into:
>
>         web.config.db_parameters = dict(dbn='sqlite', db='testdb')
>         web.config.db_printing = True
>         web.load()
>         #x = web.select("todo")
>
> Notice that the web.select() is commented out.  That is to verify that
> the problem does indeed occur in web.load()  which it does.
> Unfortunately the traceback I'm getting isn't clarifying the issue for
> me.
>
> Further details.  This app is being run from a fastcgi process called
> from a GWT app residing in a virtual host.  EVERYTHING else works ( so
> far / knock on wood ).  But as soon as I try to web.load() I get this
> error:
>
>  /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
> packages/web.py-0.22-py2.5.egg/web/utils.py in
> __getattr__(self=<Storage {'status': '200 OK', 'headers': [('Content-
> Type', 'text/html')]}>, key='path')
>    52             return self[key]
>    53         except KeyError, k:
>    54             raise AttributeError, k
>    55
>    56     def __setattr__(self, key, value):
> builtin AttributeError = <type 'exceptions.AttributeError'>, k =
> KeyError('path',)
> <type 'exceptions.AttributeError'>: 'path'
>
> As you can see I'm running on OS X, and Python 2.5, and web 0.22.  If
> anybody has run into this before and has a clear handle on the
> solution, or where to start looking for it I would be most
> appreciative for the guidance.
>
> Thanks,
> Ray

Well after spending an hour wrestling with this little itty bitty
problem, I finally decided to ask for help.  So of course less than 8
minutes after I click post I get it solved.  C'est la vie.

The solution is putting:

         web.config.db_parameters = dict(dbn='sqlite', db='testdb')
         web.config.db_printing = True
         web.load()

Before the web.run().

DON'T FORGET web.load() there.  I was "idiotically" trying to place it
directly before web.select() ... I plead distraction as my only
defense!  So there you are a complete non-issue.  But just in case
someone else runs into the AttributeError: 'db_cursor' with
web.select() and tries to fix it by putting the web.load() in the POST
section of a "Page" ... Just don't.

Thanks,
Ray


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to