Re: Error Opening Database

[email protected]
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <OF185EE589.4AFC6070-ON85257210.00731A0D-85257210.00732BC6@bankofny.com>
I think you need this:

self.con = sqlite.connect('projname', isolation_level=None)

unless projname is a variable.



Thanks,

Greg Givler
Information Technology
Lockwood®
10 Valley Stream Parkway
Malvern, PA 19355
Phone: (484) 605-4826
Email: [email protected]


                                                                                                                                           
                      Rich Shepard                                                                                                         
                      <rshepard@appl-ecosys        To:       [email protected]                                                      
                      .com>                        cc:                                                                                     
                      Sent by:                     Subject:  [pysqlite] Error Opening Database                                             
                      pysqlite-bounces@list                                                                                                
                      s.initd.org                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      10/23/2006 04:43 PM                                                                                                  
                      Please respond to                                                                                                    
                      Rich Shepard; Please                                                                                                 
                      respond to "For users                                                                                                
                      of the pysqlite                                                                                                      
                      database module."                                                                                                    
                                                                                                                                           
                                                                                                                                           




   As I test during development I come across errors I don't understand.
Below is one of them:

[rshepard@salmo /data1/eikos]$ python eikos.py
Traceback (most recent call last):
   File "eikos.py", line 515, in OnFileNew
     self.OnOpenDB(projname)
   File "eikos.py", line 175, in OnOpenDB
     self.con = sqlite.connect(projname, isolation_level=None)
AttributeError: 'unicode' object has no attribute 'connect'

   Where does 'unicode object' come from?

   As an aside, when I enter a 'projname', should the '.db' extension be
explicitly included?

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
_______________________________________________
pysqlite mailing list
pysqlite-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/pysqlite

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please call the help desk at ext 4850
______________________________________________________________________




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
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.