Re: PyDO and sqlite

Jacob Smullyan <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Wed, Feb 02, 2005 at 07:59:08PM -0500, Ryan Krauss wrote:
> Thanks for your help.  I have followed your modified install 
> instructions (copying from the skunkweb full install) and things seem to 
> be going better.  I am still having problems running the example 
> though.  Are there sqlite install requirements?  I have been using the 
> pyslite package, but don't have sqlite itself installed as an 
> executeable.  

I'd assume that pysqlite requires sqlite installed as at least a
shared library.  Does your pysqlite installation work by itself?

The test() method was a cheesy method I put in for myself and calling
it wouldn't work for you unmodified.  If you look at the source,
you'll see that it has a path to a db file in my home directory in it
that is unlikely to be on your system!  And furthermore, it assumes
the existence of a table in that db.

However, I've verified that the test method does work if you have it
point to a file that you can actually access and create a table
corresponding to the Contact class in it (CREATE TABLE Contact (id
integer primary key, first_name text, last_name text, home_email
text).

This all needs cleaning up, and I'm creating a new sub-project for
PyDO on berlios that a new cleaner version will come to live in, knock
wood.

j

> 
> >>>sqliteconn.test()
> Traceback (most recent call last):
>  File "<input>", line 1, in ?
>  File "sqliteconn.py", line 113, in test
>    contacts=Contact.getSome()
>  File "C:\Python23\Lib\site-packages\static.py", line 51, in __call__
>    return apply(self.meth, (self.obj,) + args, kw)
>  File "C:\Python23\Lib\site-packages\PyDO\PyDO.py", line 362, in 
> static_getSome
>    sql, values = apply( self.getSomeSQL, (), kw)
>  File "C:\Python23\Lib\site-packages\static.py", line 51, in __call__
>    return apply(self.meth, (self.obj,) + args, kw)
>  File "C:\Python23\Lib\site-packages\PyDO\PyDO.py", line 308, in 
> static_getSomeSQL
>    conn = self.getDBI()
>  File "C:\Python23\Lib\site-packages\static.py", line 51, in __call__
>    return apply(self.meth, (self.obj,) + args, kw)
>  File "C:\Python23\Lib\site-packages\PyDO\PyDO.py", line 137, in 
> static_getDBI
>    conn = DBIGetConnection(self.connectionAlias)
>  File "C:\Python23\Lib\site-packages\PyDO\PyDBI.py", line 40, in 
> DBIGetConnection
>    raise ValueError, "alias %s not recognized" % alias
> 
> Thanks again,
> 
> Ryan
> ValueError: alias test not recognized
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Skunkweb-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/skunkweb-list
> 

-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCAnWxuqamFyFXXLIRAnSwAJ9wVOY+pkyXWvosZhr64IWgpLUkIwCfUGr2
3Zi1MO7CCEa0kNMXdZxEBjQ=
=Nw8O
-----END PGP SIGNATURE-----
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.