pysqlite problem
Hello,
I'm getting the following error:
pysqlite2.dbapi2.OperationalError: no such table: tbl1
Here's my code:
from pysqlite2 import dbapi2 as sqlite
con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
cur = con.cursor()
cur.execute("select * from tbl1")
data = cursor.fetchall()
for record in date:
record[0], record[1]
my installation versions:
python 2.4.2
pysqlite 2.0.7
sqlite 3.3.4
I checked to make sure I have a table called tbl1. I don't understand
what's going on. Any ideas?
--
http://mail.python.org/mailman/listinfo/python-list
Re: pysqlite problem
my bad. that was the wrong code, here is my code:
from pysqlite2 import dbapi2 as sqlite
con = sqlite.connect("ex1")
cur = con.cursor()
cur.execute("select * from tbl1")
print cur.fetchall()
--
http://mail.python.org/mailman/listinfo/python-list
Re: pysqlite problem
I tried using the path "c:\ex1.db" and it worked. I was using "ex1.db" before. Thanks everyone for the help. This is a great community and maybe next time I will ask a harder question :) -- http://mail.python.org/mailman/listinfo/python-list
django and mod_python
Hi, I read the mod_python documentation on the Django site but I'm getting this error: EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'accesshiphop.settings' (is it on sys.path?): No module named accesshiphop.settings Here's my httpd.conf: PythonPath "[r'c:/apache/public_html/myproject/']+sys.path" SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE myproject.settings PythonDebug On Also, the Django site says "Also, if you've manually altered your PYTHONPATH to put your Django project on it, you'll need to tell mod_python:" I don't recall adding my project to my PYTHONPATH. Should I have done this? How do I do this? Thanks. -- http://mail.python.org/mailman/listinfo/python-list
