473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to get full-text search of pysqlite3 work in python2.5.2

Hi,
my environment is debian, python 2.5.2.
when i call con.enable_load_extension(True), the following message
prompt out.
debian:~# python2.5
Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import sqlite3
con = sqlite3.connect(":memory:")
con.enable_load_extension(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'

Thanks
Hawk
Oct 30 '08 #1
4 2423
On 10/30/08, hawk <ga*****@gmail.comwrote:
Hi,
my environment is debian, python 2.5.2.
when i call con.enable_load_extension(True), the following message
prompt out.
debian:~# python2.5
Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import sqlite3
>>con = sqlite3.connect(":memory:")
>>con.enable_load_extension(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'
enable_load_extension was added in pysqlite 2.5, but python 2.5.2
includes an older version of pysqlite.
Thanks
Hawk

--
http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
Oct 30 '08 #2
On Oct 30, 8:21*pm, "Guilherme Polo" <ggp...@gmail.comwrote:
On 10/30/08, hawk <gaoh...@gmail.comwrote:
Hi,
*my environment is debian, python 2.5.2.
*when i call con.enable_load_extension(True), the following message
*prompt out.
*debian:~# python2.5
*Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
*[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
*Type "help", "copyright", "credits" or "license" for more information.
*>>import sqlite3
*>>con = sqlite3.connect(":memory:")
*>>con.enable_load_extension(True)
*Traceback (most recent call last):
* File "<stdin>", line 1, in <module>
*AttributeError: 'sqlite3.Connection' object has no attribute
*'enable_load_extension'

enable_load_extension was added in pysqlite 2.5, but python 2.5.2
includes an older version of pysqlite.
*Thanks
*Hawk
--
*http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
i have solved this problem by install from latest source package. but,
another issue raised, when i called con.execute("select
load_extension('./fts3.so')") and con.execute("CREATE VIRTUAL TABLE
posts using FTS3(title, body);"). the error message is,
>>from pysqlite2 import dbapi2 as sqlite3
con = sqlite3.connect(":memory:")
con.enable_load_extension(True)
con.execute("select load_extension('./fts3.so')")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pysqlite2.dbapi2.OperationalError: extension loading is disabled

i checked whole file system for fts.so. but there is no fts3.so
anymore. then i downloaded the full source code of latest sqlite, and
compiled it. but also, no fts2.so exists under build folder. finally,
i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
CFLAGS="-DSQLITE_ENABLE_FTS3=1" option. the whole command line is
"CFLAGS="-DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the
fts3.so cannot be found too.
how can i get the fts2.so!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Oct 30 '08 #3
sorry, all fts2 is fts3.
On Oct 30, 10:04*pm, hawk <gaoh...@gmail.comwrote:
On Oct 30, 8:21*pm, "Guilherme Polo" <ggp...@gmail.comwrote:
On 10/30/08, hawk <gaoh...@gmail.comwrote:
Hi,
*my environment is debian, python 2.5.2.
*when i call con.enable_load_extension(True), the following message
*prompt out.
*debian:~# python2.5
*Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
*[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
*Type "help", "copyright", "credits" or "license" for more information.
*>>import sqlite3
*>>con = sqlite3.connect(":memory:")
*>>con.enable_load_extension(True)
*Traceback (most recent call last):
* File "<stdin>", line 1, in <module>
*AttributeError: 'sqlite3.Connection' object has no attribute
*'enable_load_extension'
enable_load_extension was added in pysqlite 2.5, but python 2.5.2
includes an older version of pysqlite.
*Thanks
*Hawk
--
*http://mail.python.org/mailman/listinfo/python-list
--
-- Guilherme H. Polo Goncalves

i have solved this problem by install from latest source package. but,
another issue raised, when i called con.execute("select
load_extension('./fts3.so')") and con.execute("CREATE VIRTUAL TABLE
posts using FTS3(title, body);"). the error message is,
>from pysqlite2 import dbapi2 as sqlite3
con = sqlite3.connect(":memory:")
con.enable_load_extension(True)
con.execute("select load_extension('./fts3.so')")

Traceback (most recent call last):
* File "<stdin>", line 1, in <module>
pysqlite2.dbapi2.OperationalError: extension loading is disabled

i checked whole file system for fts.so. but there is no fts3.so
anymore. then i downloaded the full source code of latest sqlite, and
compiled it. but also, no fts2.so exists under build folder. finally,
i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
CFLAGS="-DSQLITE_ENABLE_FTS3=1" option. the whole command line is
"CFLAGS="-DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the
fts3.so cannot be found too.
how can i get the fts2.so!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Oct 30 '08 #4
On 10/30/08, hawk <ga*****@gmail.comwrote:
On Oct 30, 8:21 pm, "Guilherme Polo" <ggp...@gmail.comwrote:
On 10/30/08, hawk <gaoh...@gmail.comwrote:
>
>
>
Hi,
my environment is debian, python 2.5.2.
when i call con.enable_load_extension(True), the following message
prompt out.
debian:~# python2.5
Python 2.5 (release25-maint, Jul 20 2008, 20:47:25)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import sqlite3
>>con = sqlite3.connect(":memory:")
>>con.enable_load_extension(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'
>
enable_load_extension was added in pysqlite 2.5, but python 2.5.2
includes an older version of pysqlite.
>
Thanks
Hawk
>
--
http://mail.python.org/mailman/listinfo/python-list
>
--
-- Guilherme H. Polo Goncalves

i have solved this problem by install from latest source package. but,
another issue raised, when i called con.execute("select
load_extension('./fts3.so')") and con.execute("CREATE VIRTUAL TABLE
posts using FTS3(title, body);"). the error message is,
>>from pysqlite2 import dbapi2 as sqlite3
>con = sqlite3.connect(":memory:")
>>con.enable_load_extension(True)
>con.execute("select load_extension('./fts3.so')")

Traceback (most recent call last):
File "<stdin>", line 1, in <module>

pysqlite2.dbapi2.OperationalError: extension loading is disabled

i checked whole file system for fts.so. but there is no fts3.so
anymore. then i downloaded the full source code of latest sqlite, and
compiled it. but also, no fts2.so exists under build folder. finally,
i downloaded sqlite-amalgamation-3_6_4.zip and compiled it with
CFLAGS="-DSQLITE_ENABLE_FTS3=1" option. the whole command line is
"CFLAGS="-DSQLITE_ENABLE_FTS3=1" ./configure". unfortunately, the
fts3.so cannot be found too.
If you already compiled sqlite with SQLITE_ENABLE_FTS3 then you don't
need to load a fts3 extension, sqlite is already compiled with it.

Just skip the enable_load_extension and start at con.execute("CREATE
VIRTUAL TABLE posts using FTS3(title, body);").
how can i get the fts2.so!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

--
http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
Oct 30 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: daking | last post by:
I'm trying to track down a Java performance issue, and believe it may be related to GC behavior. Quick background: j2se app server running Caucho Resin 2.1.12, on RHEL3 with Sun JDK 1.4.2_04,...
0
by: reneecccwest | last post by:
SELECT d.code, d.description, v.code AS divCode, v.descripton AS divDescript, b.code AS brhCode, b.description AS brhDescript FROM Department d FULL OUTER JOIN Division v
7
by: alexcn | last post by:
I have the following query: SELECT dbo.tSymExch.exCode, dbo.tSymGrp.sgCode, dbo.tSymMain.smCode FROM dbo.tSymExch FULL OUTER JOIN dbo.tSymGrp ON dbo.tSymExch.exID =...
2
by: Larry R Harrison Jr | last post by:
I have pull-down menus in javascript and I have the code for opening a link in a new window. But I want it to open a full-sized window. I can't figure out the syntax. What I have so far: ...
1
by: onewebclick | last post by:
Is there a way to detect a browser cache is full using javascript or HTML thorugh a web page and inform the user to clear the cache to improve performance of the website. It looks like google's...
8
by: Sean Shanny | last post by:
To all, The facts: PostgreSQL 7.4.0 running on BSD 5.1 on Dell 2650 with 4GB RAM, 5 SCSI drives in hardware RAID 0 configuration. Database size with indexes is currently 122GB. DB size...
1
by: Jimmy Chen | last post by:
Recently I've done a db2 backup and restore/recovery, but the process for recovering the database was different than what I thought to be. here is what I did: DB2 is set in online mode -...
2
by: Lee | last post by:
I have two identical schema tables (one in a production library and another in a development library) and I need to be able to easily compare the data in them for errors and omissions. With...
11
by: rh00667 | last post by:
hi all, i'm confused now. how i can get the full path of an application? if myapp is in a directory which belongs to PATH, argv gives me the first token of cmd line, and not the real path of...
4
by: Brian D | last post by:
In MS SQL 2005 when you do a Full Backup does it also backup and truncate the transaction logs or do I need to back the transaction logs up separately? Thanks. Brian
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.