On May 18, 2011, at 11:12 AM, Stefan Urbanek wrote: > Hi, > > I have a quite "niche" problem: I am trying to create a stand-alone > mac application with py2app - just wraped a web service in an app > bundle. My app uses sqlalchemy and postgres (psycopg2). When I try to > run the application I get (in Console): > > ... > File "sqlalchemy/engine/url.pyc", line 116, in get_dialect > Could not determine dialect for 'postgres'. > ... > > I create the app with: > > python setup.py py2app --includes psycopg2 > > and I have verified, that psycopg is included in the final .app > bundle. Also the script works as expected without py2app. > > > Any hints what should be wrong and what should I try?
You probably want to use the name "postgresql", there's a little bit of awkwardness in how the "postgres" name is set up for backwards compatibility. Maybe the warning which is emitted is raised to an exception when py2app is used. Beyond that you'd need to figure out what's wrong with __import__() when py2app is used. Put a pdb.set_trace() into sqlalchemy/engine/url.py get_dialect() if problems persist. It does a simple __import__() of "sqlalchemy.dialects.postgresql". -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
