Suspected bug: parse error depending on platform

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Suspected bug: parse error depending on platform

Yannick Duchêne
Hello,

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.

    import sqlite3
    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.

Someone else encountered a similar issue one year ago, in the context of a
NodeJS application, here: https://github.com/brianc/node-sql/issues/314

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.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Suspected bug: parse error depending on platform

Keith Medcalf

>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.

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.




_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Suspected bug: parse error depending on platform

Yannick Duchêne
Ok, I see.

So finally using `sqlite3.sqlite_version`, it says version 3.8.11 for the
Windows version and 3.11.0 for the Ubuntu version.

May be I could solve it changing the sqlite3.dll which is in the isolated
Python environment. I will try to build it in the virtual machine.

Thanks for having pointed out my error …



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Suspected bug: parse error depending on platform

Yannick Duchêne
Finally unlike with Ubuntu, for Windows, there is not even a need to build
the library, it’s already available from https://sqlite.org/download.html




--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users