Questions tagged [pysqlite]

A DB-API2 compliant module in Python for interacting with a SQLite relational database.

140 questions
0
votes
1 answer

atomic read from sqlite database while it is being written to

Is it possible to read from a sqlite database while it is being written to? How would one go about accomplishing this? Thanks!
Tyler
  • 4,679
  • 12
  • 41
  • 60
0
votes
1 answer

No module named pysqlite2._sqlite Error with flask

Hi I m have a problem with No module named pysqlite2._sqlite error I m using SQLalchemy with flask and virtualenv when i query by model like this user = User.query.filter_by(social_id = social_id).first() i got the following error No module named…
Jack Yun
  • 19
  • 3
0
votes
2 answers
0
votes
1 answer

Getting error while installing pysqlite

I am trying to install pysqlite, but getting the below error- running install running build running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\pysqlite2 copying lib\dbapi2.py ->…
Praveen Kishor
  • 2,413
  • 1
  • 23
  • 28
0
votes
1 answer

pysqlite not accepting qmark parameterization

I have a similar question than the one that has been answered in Python pysqlite not accepting my qmark parameterization My problem is the following: I want a parameterized search for a string that is like something, not for the string itself. This…
user142295
  • 83
  • 4
0
votes
0 answers

SQLite (Spatialite) query on iOS works on 64-bit simulator but nothing else

I have a Spatialite database generated by a Django management command, which I'm embedding in an iOS app. The db opens perfectly, but I've found that querying the database on iOS only works if I'm running on a 64-bit device. Any other devices,…
majackson
  • 2,823
  • 6
  • 22
  • 38
0
votes
0 answers

Instantiating SQLAlchemy Classes within a callback function

I am new to SQLAlchemy and Python and am attempting to instantiate an sqlalchemy object within a Tkinter Button callback. Here is the code: class Test(Base): __tablename__ = "Tests" id = Column(Integer, primary_key = True) TestName =…
user2860797
  • 173
  • 1
  • 3
  • 11
0
votes
1 answer

JSON to sqlite via python: REPLACE INTO not recognizing identical rows

I am pulling data from a url/JSON, decoding, and sending elements of the JSON to a sqlite table. As I pull the JSON every other minute, sometimes I pull the same JSON (which hasn't yet been refreshed). However, I don't want to enter the same data…
user1893148
  • 1,990
  • 3
  • 24
  • 34
0
votes
1 answer

pysqlite DatabaseError: You must not use 8-bit bytestrings unless you use a text_factory

I am trying to insert a document string which I am reading through a csv file in to sqlite database which has characters like (children's), It throws the following error: DatabaseError: You must not use 8-bit bytestrings unless you use a …
Joel James
  • 3,870
  • 9
  • 32
  • 47
0
votes
1 answer

row_pop() function in pysqlite?

Need to get one row from a table, and delete the same row. It does not matter which row it is. The function should be generic, so the column names are unknown, and there are no identifiers. (Rows as a whole can be assumed to be unique.) The…
fivecode
  • 35
  • 5
0
votes
4 answers

How to build sqlite for Python 2.4?

I would like to use pysqlite interface between Python and sdlite database. I have already Python and SQLite on my computer. But I have troubles with installation of pysqlite. During the installation I get the following error message: error: command…
Verrtex
  • 4,317
  • 9
  • 34
  • 33
0
votes
1 answer

How to install pysqlite2 on Debian Squeeze?

I have a bit of a problem. I am on Debian Squeeze, and I want to install sqlite2. The problem is, when I try with: # pip install pysqlite2 I get: Downloading/unpacking pysqlite2 Could not find any downloads that satisfy the requirement pysqlite2 No…
Belphegor
  • 4,456
  • 11
  • 34
  • 59
0
votes
3 answers

How to fix this pysqlite2 AttributeError: X instance has no attribute 'con'?

When I run the entire code below, this line: res=self.con.execute( From this function (where getfeatures returns a dictionary): def fcount(self,f,cat): res=self.con.execute( 'select count from fc where feature="%s" and category="%s"' …
craftApprentice
  • 2,697
  • 17
  • 58
  • 86
0
votes
1 answer

Installing pysqlite in python with sqlite 3 version with custom file header

I wan to compile sqlite with custom file header I followed the step given here http://trac.edgewall.org/wiki/PySqlite Download pysqlite Extract it export CFLAGS="-DSQLITE_FILE_HEADER=\\\"vivek\\\"" Run python setup.py build_static python …
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
0
votes
1 answer

How do I efficiently process db queries for freq dist computation?

I've been working on this for a bit of time now, trying to create a frequency distribution database side: from itertools import permutations import sqlite3 def populate_character_probabilities(connection, table="freq_dist",…
user1438003
  • 6,603
  • 8
  • 30
  • 36
1 2 3
9
10