[MAC OS X] SQLAlchemy RuntimeWarning sqlite out dated...but is not!

12 views
Skip to first unread message

venomous

unread,
May 6, 2007, 4:10:38 PM5/6/07
to TurboGears
Hi all,
i have got a mac and i have installed turbogears on it.
I don't know if this is a really error, but it' making me crazy.
When using sqlalchemy i get this error when starting the project or
creating the db with sqlite:
</Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
packages/SQLAlchemy-0.3.7-py2.4.egg/sqlalchemy/databases/sqlite.py:
157: RuntimeWarning: The installed version of sqlite is out-dated, and
will cause errors in some cases.Version 3.3.13 or greater is
recommended>
I have upgrade sqlite3 to the latest version, i have tried with both
MacPython 2.4 and 2.5. Installed manually pysqlite and sqlalchemy,
nothing i have always this error.
I have sqlite version 3.3.17, so i can't figure why i get this
warning. Tried searching on google, but seems that tis happens only
too me.
Thanks in advance for any help.

Christoph Zwerschke

unread,
May 6, 2007, 4:31:55 PM5/6/07
to turbo...@googlegroups.com
venomous schrieb:

> When using sqlalchemy i get this error when starting the project or
> creating the db with sqlite:
> </Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
> packages/SQLAlchemy-0.3.7-py2.4.egg/sqlalchemy/databases/sqlite.py:
> 157: RuntimeWarning: The installed version of sqlite is out-dated, and
> will cause errors in some cases.Version 3.3.13 or greater is
> recommended>
> I have upgrade sqlite3 to the latest version, i have tried with both
> MacPython 2.4 and 2.5. Installed manually pysqlite and sqlalchemy,
> nothing i have always this error.
> I have sqlite version 3.3.17, so i can't figure why i get this
> warning. Tried searching on google, but seems that tis happens only
> too me.

I have seen this too, but found not time to examine this so far. Maybe
this happened after upgrading vom SQ 0.3.6 to 0.3.7.

-- Chris

venomous

unread,
May 6, 2007, 5:10:51 PM5/6/07
to TurboGears

Christoph Zwerschke ha scritto:

have seen this too, but found not time to examine this so far. Maybe
> this happened after upgrading vom SQ 0.3.6 to 0.3.7.
>
> -- Chris

This is my first mac so i'm very unfamiliar with it, usually i use
Linux and on my notebook with linux i have updated turbogears to
10.2.2 and i haven't noticed any error, but if i'm not wrong on the
linux box i still have SA 0.3.6.
Thanks for the hint, i will try downgrading SA.
Regards,
Carlo.

venomous

unread,
May 6, 2007, 6:25:45 PM5/6/07
to TurboGears
Ok,
i have tried with SQLAlchemy 0.3.6 an no errors, so i think is related
to 0.3.7 version of SQLAlchemy.
By the way, should i ask/ post this issue on the SA mailing list?
Regards


Christoph Zwerschke

unread,
May 6, 2007, 8:42:36 PM5/6/07
to turbo...@googlegroups.com
venomous schrieb:

> By the way, should i ask/ post this issue on the SA mailing list?

Sure, as it really seems to be a SA issue.

Arthur Clune

unread,
May 7, 2007, 6:30:09 AM5/7/07
to turbo...@googlegroups.com


On 6 May 2007, at 21:10, venomous wrote:


</Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
packages/SQLAlchemy-0.3.7-py2.4.egg/sqlalchemy/databases/sqlite.py:
157: RuntimeWarning: The installed version of sqlite is out-dated, and
will cause errors in some cases.Version 3.3.13 or greater is
recommended>


I had this - it's because the install of py-sqlite is picking up
the Apple version of sqlite not your updated version

biber: /usr/bin/sqlite3 -version
3.1.3
biber: /opt/local/bin/sqlite3 -version
3.3.17

Arthur


-- 
if you're on a SAN, you're using a network designed by disk firmware writers. God help you - Jeff Bonwick



venomous

unread,
May 7, 2007, 9:57:26 AM5/7/07
to TurboGears
On 7 Mag, 12:30, Arthur Clune <art...@clune.org> wrote:
> I had this - it's because the install of py-sqlite is picking up
> the Apple version of sqlite not your updated version
>
> biber: /usr/bin/sqlite3 -version
> 3.1.3
> biber: /opt/local/bin/sqlite3 -version
> 3.3.17
>
> Arthur

Yes i supposed that this was the problem, so i have update sqlite to
the latest version of sqlite in both path /opt/local/bin (Macports)
and /usr/bin mac native version:
$ /usr/local/bin/sqlite -version
3.3.17

/usr/bin/sqlite3 -version
3.3.17

I'm feeling lost!

Arthur Clune

unread,
May 7, 2007, 10:27:51 AM5/7/07
to turbo...@googlegroups.com

On 7 May 2007, at 14:57, venomous wrote:

>
> Yes i supposed that this was the problem, so i have update sqlite to
> the latest version of sqlite in both path /opt/local/bin (Macports)
> and /usr/bin mac native version:
> $ /usr/local/bin/sqlite -version
> 3.3.17
>
> /usr/bin/sqlite3 -version
> 3.3.17

Try starting again with a fresh tarball of pysqlite from

http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
pysqlite-2.3.3.tar.gz

untar, then edit setup.cfg in the pysqlite-2.3.3 directory

Change it from this:

[build_ext]
define=
include_dirs=/usr/include
library_dirs=/usr/lib
libraries=sqlite3

to

[build_ext]
define=
include_dirs=/opt/local/include
library_dirs=/opt/local/lib
libraries=sqlite3

then run python setup.py build etc in the normal way.

mike bayer

unread,
May 7, 2007, 11:16:51 AM5/7/07
to TurboGears
just a heads up about a few things regarding this:

the errors that SQLite fixes in version 3.3.13 was probably introduced
in sqlite 3.3.9, and its this ticket:

http://www.sqlite.org/cvstrac/tktview?tn=2211

to see how well your sqlite version works, run the unit tests. they
pass 100% with sqlite 3.3.13 .

to know immediately what version of sqlite your pysqlite is bound to:

using pysqlite2:

>>> from pysqlite2 import dbapi2 as dbapi
>>> dbapi.sqlite_version
'3.3.13'

using py2.5's builtin sqlite:

>>> import sqlite3
>>> sqlite3.sqlite_version
'3.3.5'

note that SQLAlchemy imports sqlite like this (i.e. importing an
external pysqlite2 first, then the sqlite3 built in):

try:
from pysqlite2 import dbapi2 as sqlite
except ImportError, e:
try:
from sqlite3 import dbapi2 as sqlite #try the 2.5+
stdlib name.
except ImportError:
try:
sqlite = __import__('sqlite') # skip ourselves
except ImportError:
raise e

this behavior can be overridden by passing in a sqlite module directly
to create_engine:

create_engine('sqlite://', module=sqlite3)


venomous

unread,
May 7, 2007, 1:54:20 PM5/7/07
to TurboGears
Well so first i edited the file setup.cfg as suggested from Arthur,
the package seems installed correctly, but "setup.py build" returned
to me this output:

/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning /usr/local/lib/libsqlite3.dylib cputype (7,
architecture i386) does not match cputype (18) for specified -arch
flag: ppc (file not loaded)

Why pysqlite builds as power pc architeture?

Anyway i tried the pysqlite test and no errorrs:

""
from pysqlite2 import test

In [4]: test.test()
.............................................................................................................................................................................
----------------------------------------------------------------------
Ran 173 tests in 0.220s

OK
""

Also SQLAlchemy don't show errors anymore.
So i'm fine?

Thanks all for the great help!

Olli Wang

unread,
May 8, 2007, 3:23:59 AM5/8/07
to TurboGears
Hi, I got the same problem in XP, too. I use Python2.5 so it's no need
to install pysqlite, right? My SA version is 0.3.7, and my Sqlite is
surely not out of date. Any one got the same problem?

Dominique Eav

unread,
May 8, 2007, 4:43:37 AM5/8/07
to turbo...@googlegroups.com

Your sqlite certainly *is* out of date and can be updated, even if you
installed it bundled with python 2.5. If you want to be really sure,
locate the log in the code and add temporarily some print statements
about your sqlite version.

I ran into this problem as a debian etch user and had to backport sqlite
3.3.16 from debian sid to make sqlAlchemy 0.3.7 happy again. I put my
packages at

http://dom.eav.free.fr/etch-sqlite3.3.16/

if some etch user is interested...

dom


asm

unread,
May 8, 2007, 1:18:33 PM5/8/07
to TurboGears

Same problem on OpenBSD 4.1 ... time to either wrestle with ports
or revert to PostgreSQL.

Probably not what you meant when you asked if anyone had the
same question!

Olli Wang

unread,
May 9, 2007, 10:01:32 AM5/9/07
to TurboGears
Thanks for help. I finally figured out what the point is. I used to
copy sqlite3.dll into directory C:\window\system32.
But after I installed python 2.5. It includes sqlite3.dll in C:
\python25\DLLs and set as default.
So the resolution is copy the new sqlite3.dll version into C:
\python25\DLLs and everything is beautiful again.
Reply all
Reply to author
Forward
0 new messages