Comments (8)
For completeness:
In [7]: apsw.sqlitelibversion()
Out[7]: '3.40.1'
from apsw.
The above was with apsw shipped from Debian bullseye. Current PyPi version (3.42) seems to work fine.
Is this a known problem in 3.40.0.
from apsw.
Before SQLite 3.42 it would only allow the log handler (SQLITE_CONFIG_LOG) to be changed before the full initialization of the SQLite library. ie you would need to install the log handler immediately after import and before any other operation. If done after initialization there would be MISUSE_ERROR.
- SQLite 3.42.0 release notes point 3 allowing SQLITE_CONFIG_LOG to occur at any time
- Commit removing help text explaining MISUSE_ERROR.
from apsw.
Is this a known problem in 3.40.0.
To support SQLite before 3.42 you'll need to install the log handler immediately after import before doing any operations.
The documentation currently only covers the current version. I've avoided trying to be multi-version due to the complexity and increased workload.
from apsw.
Hmm. This error started showing up after I upgraded my system to current Debian stable. So the same code was working with some past version. Checking ~/.local/lib and /usr/local/lib I also do not see any more recent apsw versions, so I'm pretty sure whatever was shipped with Debian in the previous release supported this. Odd.
from apsw.
You probably got lucky in that the install logger call happened before anything else called into SQLite. All it takes is a site package to disturb things. For example on Ubuntu apport changes sys.excepthook
which then causes other Python code to behave differently! Unless you have whole system snapshots it will be hard to diagnose.
Behind the scenes APSW is just calling sqlite3_config(SQLITE_CONFIG_LOG, handler)
without any sophistication or magic.
from apsw.
You can diagnose what is causing SQLite to be initialized:
$ gdb --args python3 myscript.py
(gdb) b sqlite3_initialize
Function "sqlite3_initialize" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (sqlite3_initialize) pending.
(gdb) run
from apsw.
thanks!
from apsw.
Related Issues (20)
- Unknown apsw attribute 'SQLiteValues' HOT 3
- Cursor.executemany should be annotated as accepting Iterable[Bindings] instead of Sequence[Bindings] HOT 1
- Implement Unicode TR-29 and TR-14 HOT 1
- error: static declaration of ‘PyLong_AsInt’ in Python 3.13+ HOT 3
- Switch to cosign for signing
- Incorrect values in `colUsed` HOT 2
- Update to Unicode 16.0 when released September 2024 HOT 1
- connection.set_row_trace - excepts; Connection.setrowtrace works HOT 4
- `connection.setrowtrace` stops working when adapters are registered HOT 5
- Datetimes into sqlite via APSW HOT 1
- Revise logging levels
- query execution row and time limits HOT 1
- Support subtypes in functions
- Don't cache pragmas
- con.pragma can't accept blobs HOT 1
- Update Connection.pragma with schema parameter
- Implement SQLITE_FCNTL_VFSNAME
- VFS xRandomness errors need to be unraisable HOT 1
- apsw.ext.query_info should find bound parameters
- Comprehensive dump module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apsw.