Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211952 - dev-lang/python-2.5.1-r5: show error when I import sqlite3 module
Summary: dev-lang/python-2.5.1-r5: show error when I import sqlite3 module
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://www.unknown-boy.com/GCBot/bugs...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-01 09:02 UTC by Foad Nosrati Habibi
Modified: 2008-03-02 07:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Foad Nosrati Habibi 2008-03-01 09:02:47 UTC
I use "import sqlite3" in my program, but when I run it show this error:
$ python gcbot.py
Traceback (most recent call last):
  File "gcbot.py", line 39, in <module>
    import sqlite3
  File "/usr/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
    from dbapi2 import *
  File "/usr/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: No module named _sqlite3

Reproducible: Always

Steps to Reproduce:
1. I write a python program that have "import sqlite3"
2. When I run it by python it show error and crash.

Actual Results:  
Show error and crash.

Expected Results:  
The program should run and import sqlibe3 to and use sqlibe3 database.

I have installed python-2.4.4-r9 and python-2.5.1-r5. For this program I use python-2.5.1-r5.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-01 10:25:13 UTC
It would work a lot better like this ;)

from sqlite3 import *
Comment 2 Foad Nosrati Habibi 2008-03-01 10:35:38 UTC
(In reply to comment #1)
> It would work a lot better like this ;)
> 
> from sqlite3 import *
> 

But still it gives same error:

Traceback (most recent call last):
  File "gcbot.py", line 39, in <module>
    from sqlite3 import *
  File "/usr/lib/python2.5/sqlite3/__init__.py", line 24, in <module>
    from dbapi2 import *
  File "/usr/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: No module named _sqlite3
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-03-01 10:42:12 UTC
-from _sqlite3 import *
+from sqlite3 import *

Spot the difference.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-03-01 13:11:19 UTC
On that note

- did you compile python-2.5 w/ USE=sqlite?
- if yes, does /usr/lib/python2.5/lib-dynload/_sqlite3.so exist?
Comment 5 Foad Nosrati Habibi 2008-03-02 06:07:41 UTC
sorry from all,
problem was my use flags, it fixed. thank you
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-03-02 07:29:41 UTC
Thanks for reporting back. :)