I already have a line like:

import sqlite3 as sqlite

I even tried explicitly telling sqlalchemy to use the sqlite module
like this:

metadata = BoundMetaData("sqlite:///%s"%dbfile, module=sqlite)

I also tried

import sqlite3
...
metadata = BoundMetaData("sqlite:///%s"%dbfile, module=sqlite3)

All works fine when I run the app inside my development enviroment but
when I build it with py2exe I still get:

Traceback (most recent call last):
  File "patch.py", line 51, in <module>
  File "model.pyc", line 91, in __init__
  File "model.pyc", line 60, in createDB
  File "sqlalchemy\schema.pyc", line 1190, in __init__
  File "sqlalchemy\schema.pyc", line 1095, in __init__
  File "sqlalchemy\schema.pyc", line 1114, in connect
  File "sqlalchemy\engine\__init__.pyc", line 154, in create_engine
  File "sqlalchemy\engine\strategies.pyc", line 44, in create
  File "sqlalchemy\engine\url.pyc", line 92, in get_dialect
ImportError: unknown database 'sqlite'

The library.zip contains the sqlite3 files (sqlite3.dll, _sqlite3.pyd
and the sqlite3 directory)

I'm using python 2.5.1, sqlalchemy-0.3.7-py2.5 and py2exe-0.6.6-py2.5

I know this is a silly question but have any of you managed to create
a py2exe distribution with sqlalchemy/sqlite inside?

I've tried everything I could think of, even completely erasing my
python development enviroment and doing a fresh install of 2.5 with
only the minimal packages.

Any idea is welcomed (maybe I can alter some sqlalchemy file and
statically load sqlite)

Thanks in advance.
Peter

On May 30, 10:21 am, ml <[EMAIL PROTECTED]> wrote:
> Hi!
>
> Just put somewhere an explicit "import sqlite". It should be enough.
>
> David
>
> pdamoc napsal(a):
>
> > Hello,
>
> > I've tried packing an app I've made with py2exe and run into
> > trouble...
> > first it was an EGG issue, I've fixed that installing everything as a
> > directory
> > next came the sqlite issue... I simply cannot get it to work
>
> > after I build the .exe I keep getting:
>
> > Traceback (most recent call last):
> >   File "patch.py", line 53, in <module>
> >   File "model.pyc", line 87, in __init__
> >   File "model.pyc", line 56, in createDB
> >   File "sqlalchemy\schema.pyc", line 1190, in __init__
> >   File "sqlalchemy\schema.pyc", line 1095, in __init__
> >   File "sqlalchemy\schema.pyc", line 1114, in connect
> >   File "sqlalchemy\engine\__init__.pyc", line 154, in create_engine
> >   File "sqlalchemy\engine\strategies.pyc", line 44, in create
> >   File "sqlalchemy\engine\url.pyc", line 92, in get_dialect
> > ImportError: unknown database 'sqlite'
>
> > The app works fine when I start it as a script.
>
> > any idea is welcomed!
>
> > Thank you in advance.
> > Peter.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to