I have created a sqlite3 db in python2.5. Can I access it using the appwizard in
dabo 0.7? So far no luck. I can create a connection in the connection editor and
it tests ok. But in the app wizard this same connection generates an error:
File "d:\program
files\python24\lib\site-packages\Dabo-0.7s-py2.4.egg\dabo\db\dbSQLite.py", line
74, in getTables
tempCursor.execute("select * from sqlite_master")
OperationalError: unsupported file format
Any ideas?
efil si doog
On Nov 19, 2006, at 2:30 PM, HWP wrote:
> I have created a sqlite3 db in python2.5. Can I access it using the
> appwizard in
> dabo 0.7? So far no luck. I can create a connection in the
> connection editor and
> it tests ok. But in the app wizard this same connection generates
> an error:
>
> File "d:\program
> files\python24\lib\site-packages\Dabo-0.7s-py2.4.egg\dabo\db
> \dbSQLite.py", line
> 74, in getTables
> tempCursor.execute("select * from sqlite_master")
> OperationalError: unsupported file format
>
> Any ideas?
I've gotten that error when trying to access a sqlite database
created in another version than the one on the machine being used.
For example, I had a test sqlite database that I copied over to an
Ubuntu machine, and got that error. The connection editor just checks
to make sure that the connection parameters are valid; in the case of
a sqlite connection, as long as the database exists, it will report
success, since there is no login requirements.
I haven't played with the sqlite support in Python 2.5 yet, as I've
been trying to keep things standardized before our release. My guess
is that there may be some syntax differences, although I would be
surprised if they were significant.
-- Ed Leafe
I am handcoding a Dabo app. When I run it I get the following error:
Traceback (most recent call last):
File "dMask.py", line 66, in <module>
testBizobj = TestBizobj(conn)
File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
line 51, in __init__
self.setConnection(conn)
File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
line 129, in setConnection
self.dbapiCursorClass = self._cursorFactory.getDictCursorClass()
AttributeError: 'sqlite3.Connection' object has no attribute
'getDictCursorClass'
Version info: Platform: GTK
Python Version: 2.6.5 on linux2
Dabo Version: Version 0.9.2; Revision ~5924
UI Version: 2.8.11.0 on wxGTK (gtk2)
Sqlite3 was installed with Ubuntu Lucid so it should be version 3.6.22-1
Thanks, Jim
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4CA505ED.904@comcast.net
On Sep 30, 2010, at 5:49 PM, Jim Byrnes wrote:
> I am handcoding a Dabo app. When I run it I get the following error:
>
> Traceback (most recent call last):
> File "dMask.py", line 66, in <module>
> testBizobj = TestBizobj(conn)
> File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
> line 51, in __init__
> self.setConnection(conn)
> File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
> line 129, in setConnection
> self.dbapiCursorClass = self._cursorFactory.getDictCursorClass()
> AttributeError: 'sqlite3.Connection' object has no attribute
> 'getDictCursorClass'
>
> Version info: Platform: GTK
> Python Version: 2.6.5 on linux2
> Dabo Version: Version 0.9.2; Revision ~5924
> UI Version: 2.8.11.0 on wxGTK (gtk2)
>
> Sqlite3 was installed with Ubuntu Lucid so it should be version 3.6.22-1
The error has nothing to do with Sqlite; it's in the dConnection class (which is the bizobj's _cursorFactory). My guess is that you are using a plain connection to the database, and not a Dabo dConnection.
Can you show me the code where the 'conn' in the dMask.py code is defined?
-- Ed Leafe
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/7EA7F30A-5542-4FE9-B826-4D49AE1C0FAA@leafe.com
On Thursday, September 30, 2010 02:49:33 pm Jim Byrnes wrote:
> I am handcoding a Dabo app. When I run it I get the following error:
>
> Traceback (most recent call last):
> File "dMask.py", line 66, in <module>
> testBizobj = TestBizobj(conn)
> File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
> line 51, in __init__
> self.setConnection(conn)
> File "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py",
> line 129, in setConnection
> self.dbapiCursorClass = self._cursorFactory.getDictCursorClass()
> AttributeError: 'sqlite3.Connection' object has no attribute
> 'getDictCursorClass'
>
> Version info: Platform: GTK
> Python Version: 2.6.5 on linux2
> Dabo Version: Version 0.9.2; Revision ~5924
> UI Version: 2.8.11.0 on wxGTK (gtk2)
>
> Sqlite3 was installed with Ubuntu Lucid so it should be version 3.6.22-1
>
> Thanks, Jim
for testing checkout what I did on the wiki
http://wiki.dabodev.com/CreateAOpenOfficeSpreadSheet
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/201009301459.46165.johnf@jfcomputer.com
Ed Leafe wrote:
> On Sep 30, 2010, at 5:49 PM, Jim Byrnes wrote:
>
>> I am handcoding a Dabo app. When I run it I get the following
>> error:
>>
>> Traceback (most recent call last): File "dMask.py", line 66,
>> in<module> testBizobj = TestBizobj(conn) File
>> "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py", line
>> 51, in __init__ self.setConnection(conn) File
>> "/usr/local/lib/python2.6/dist-packages/dabo/biz/dBizobj.py", line
>> 129, in setConnection self.dbapiCursorClass =
>> self._cursorFactory.getDictCursorClass() AttributeError:
>> 'sqlite3.Connection' object has no attribute 'getDictCursorClass'
>>
>> Version info: Platform: GTK Python Version: 2.6.5 on linux2 Dabo
>> Version: Version 0.9.2; Revision ~5924 UI Version: 2.8.11.0 on
>> wxGTK (gtk2)
>>
>> Sqlite3 was installed with Ubuntu Lucid so it should be version
>> 3.6.22-1
>
>
> The error has nothing to do with Sqlite; it's in the dConnection
> class (which is the bizobj's _cursorFactory). My guess is that you
> are using a plain connection to the database, and not a Dabo
> dConnection.
>
> Can you show me the code where the 'conn' in the dMask.py code is
> defined?
>
>
>
> -- Ed Leafe
No need for the code, you are correct. I can connect using dConnection.
I was looking at and possibly misunderstanding an example I found that
was written in 2008.
Thanks, Jim
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4CA52A26.4000307@comcast.net
John Fabiani wrote:
>
>
> for testing checkout what I did on the wiki
>
> http://wiki.dabodev.com/CreateAOpenOfficeSpreadSheet
>
> Johnf
Actually I was working off of an email you wrote back in 2008. It looks
quite different from the wiki, Things must have changed a lot in the
interim. Thanks for the example.
Regards, Jim
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/4CA52B93.4090205@comcast.net
On Thursday, September 30, 2010 05:30:11 pm Jim Byrnes wrote:
> John Fabiani wrote:
> > for testing checkout what I did on the wiki
> >
> > http://wiki.dabodev.com/CreateAOpenOfficeSpreadSheet
> >
> > Johnf
>
> Actually I was working off of an email you wrote back in 2008. It looks
> quite different from the wiki, Things must have changed a lot in the
> interim. Thanks for the example.
>
> Regards, Jim
To my knowledge the connection stuff hasn't change in years. But it's
possible get connections object many different ways. But it's best just to
use the standard way.
self.Application.addConnectFile("summit.cnxml")
self.apiconn = self.Application.getConnectionByName("summitConn")
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/201009301733.22759.johnf@jfcomputer.com