Re: Please Explain This Error

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Thu, 2 Nov 2006, [email protected] wrote:

> Where is the line self.cur = self.con.cursor() You have to allocation
> the cursor from the connection.

Greg,

   That's defined in the MainFrame class. When I add it to this particular
module, python complains,

   File "/data1/eikos/policyPage.py", line 58, in __init__
     self.cur = self.con.cursor()
AttributeError: 'modPolicy' object has no attribute 'con'

   Well, I thought perhaps the problem was doing the database retrievals from
within the __init__ function. But, that's not the case. I get the same error
if I create a separate function just to load these values into the tree
control widget.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.