I’em facing an issue developing a Python+SQlite3 application on Ubuntu, to
be shipped on Windows 7.
The simple example below works as expected on Ubuntu, but fails on Windows
7. Both using Python3.5 and Sqlite 2.6.0, so that’s not a version issue.
conn = sqlite3.connect(":memory:")
conn.execute("create view v(c) as values(1);")
No error on Ubuntu but fails on Windows 7 with this message:
sqlite3.OperationalError: near "(": syntax error
If that matters for anything, I’m testing the application on Windows 7 32
bits running in Virtualbox, using the image provided by Microsoft. The
Python3.5 I use on Ubuntu is in a vitualenv and the one for Windows is from
a bundle archive provided by the Python community website. This archive
contains an isolated Python environment.
For the personal story, the real (above is a sample for testing the issue)
view table SQLite don’t want to create is to be used by a trigger running
some checks. So I have to drop it. It does not prevent the application from
running, but it will be less reliably without this trigger.
Re: Suspected bug: parse error depending on platform
>The simple example below works as expected on Ubuntu, but fails on
>Windows 7. Both using Python3.5 and Sqlite 2.6.0, so that’s not a
2.6.0 is not the version of SQLite3, it is the version of the pysqlite2 wrapper module. When that third party package was incorporated into the Python distribution its name was changed to the package sqlite3.
The "package (wrapper)" version is sqlite3.version or sqlite3.version_info
The "SQLite3 (database engine)" versions is sqlite3.sqlite_version or sqlite3.sqlite_version_info
So probably you have an "old as the hills" version of SQLite3 (the database engine -- the thing that actually does anything) on Windows 7.
The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.