sqlalchemy.exc.OperationalError: (OperationalError) unknown database "cedict_0"

146 views
Skip to first unread message

Victor

unread,
Oct 3, 2011, 3:52:53 PM10/3/11
to cjklib-devel
Hi All,

I've been trying to use the dictionary class in CJKLIB. The
CharacterLookup methods work perfectly. Now, after installing CEDICT,
I try:

>>> from cjklib.dictionary import CEDICT
>>> d = CEDICT()

A bunch of error messages come up, ending with:
=========== =============
File "/Library/Python/2.7/site-packages/SQLAlchemy-0.7.2-py2.7-
macosx-10.7-intel.egg/sqlalchemy/engine/default.py", line 328, in
do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) unknown database
"cedict_0" 'PRAGMA "cedict_0".table_info("CEDICT")' ()
========================

I don't know much about databases, but I just tried to add a couple
print statements to the sqlalchemy's engine/default.py, in the routine
do_execute. I just had it print out cursor (a pointer), the statement
and the parameters passed in. And these are the statements before the
Trackback comes up:


<sqlite3.Cursor object at 0x10d4653b0>
Statement: ATTACH DATABASE ? AS ?
Parameters: ('/Library/Application Support/cjklib/cedict.db',
'cedict_0')
<sqlite3.Cursor object at 0x10d4653b0>
Statement: PRAGMA "main".table_info("CEDICT")
Parameters: ()
<sqlite3.Cursor object at 0x10d4653b0>
Statement: PRAGMA "cedict_0".table_info("CEDICT")
Parameters: ()

So I guess for some reason the databse doesn't recognize cedict_0 as
a valid name for the database? But it seems like it's been attached.
I have no idea why.

I'm running this on Mac OS Lion, sqlalchemy 0.7.2, python 2.7.1,
sqlite3.

Thanks in advance!

- Victor
Reply all
Reply to author
Forward
0 new messages