I know nothing about py2exe. If it was working for you earlier, I'm not sure what changed. Put some print statements into url.py perhaps, it's just doing __import__("sqlalchemy.dialects" + ".mssql" + ".pyodbc"), essentially.
0.8 is actually doing the same thing for the built in dialects, just the code is a little more broken up. On Apr 10, 2013, at 7:29 PM, Don Dwiggins <ddwigg...@advpubtech.com> wrote: > On 4/10/13 8:27 AM, Don Dwiggins wrote: >> On 4/9/13 2:41 PM, Michael Bayer wrote: >>> and this used to work? if you're using 0.7, it uses a fairly primitive >>> system based on __import__(). you'd want to make sure py2exe is putting >>> every .py file under dialects/ into the final package. >> Thanks, I'll look into that. Yes, I'm using 0.7.9; should I upgrade to >> 0.8.0? > > OK, I've tried several configurations of setup.py, and I've also upgraded to > 0.8.0. I'm still getting the same error. In case it'll help, here's the > traceback: > >> 2013-04-11 00:19:28+0100 [-] File "boot_service.py", line 185, in <module> >> 2013-04-11 00:19:28+0100 [-] File "win32serviceutil.pyo", line 609, in >> HandleCommandLine >> 2013-04-11 00:19:28+0100 [-] File "win32serviceutil.pyo", line 449, in >> DebugService >> 2013-04-11 00:19:28+0100 [-] File "win32serviceutil.pyo", line 806, in >> SvcRun >> 2013-04-11 00:19:28+0100 [-] File "RCAServer.pyo", line 444, in SvcDoRun >> 2013-04-11 00:19:28+0100 [-] File "RCAServer.pyo", line 358, in >> setupReactor >> 2013-04-11 00:19:28+0100 [-] File "Subscriber.pyo", line 59, in __init__ >> 2013-04-11 00:19:28+0100 [-] File "Subhandler.pyo", line 330, in __init__ >> 2013-04-11 00:19:28+0100 [-] File "Subhandler.pyo", line 37, in __init__ >> 2013-04-11 00:19:28+0100 [-] File "sqlalchemy\engine\__init__.pyo", line >> 338, in create_engine >> 2013-04-11 00:19:28+0100 [-] File "sqlalchemy\engine\strategies.pyo", line >> 50, in create >> 2013-04-11 00:19:28+0100 [-] File "sqlalchemy\engine\url.pyo", line 123, >> in get_dialect >> 2013-04-11 00:19:28+0100 [-] sqlalchemy.exc.ArgumentError: Could not >> determine dialect for 'mssql+pyodbc'. > > In "options", I set "packages" to ['sqlalchemy.dialects']. (I've also put > that in "includes", and tried ['sqlalchemy.dialects.mssql', > 'sqlalchemy.dialects.mssql.pyodbc'] and got the same traceback. > > I'm willing to instrument url.py to get more information, but I'm not sure > what to include. Any ideas or leads appreciated. > >>> >>> >>> On Apr 9, 2013, at 3:35 PM, Don Dwiggins <ddwigg...@advpubtech.com> wrote: >>> >>>> I have an application using SA that I distribute in "compiled" form, using >>>> py2exe. This has been working well, but I recently ran into a problem. I >>>> do a create_engine with the string >>>> "mssql+pyodbc://%(UserName)s:%(Password)s@%(DSN)s" (the parameters are >>>> filled in using a "%" operator). >>>> >>>> This works without a problem when I run the source code. However, when I >>>> freeze it, I get "ArgumentError: >>>> Could not determine dialect for 'mssql+pyodbc'." (Running >>>> on the same machine, with the same environment.) >>>> >>>> In case it might be relevant: I've recently moved my development from a >>>> Windows XP machine to a Windows 7 environment on a 64-bit machine. >>>> However, I'm using 32-bit Python, and generating 32-bit executables. >>>> >>>> -- >>>> Don Dwiggins >>>> Advanced Publishing Technology >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "sqlalchemy" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to sqlalchemy+unsubscr...@googlegroups.com. >>>> To post to this group, send email to sqlalchemy@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "sqlalchemy" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to sqlalchemy+unsubscr...@googlegroups.com. >>> To post to this group, send email to sqlalchemy@googlegroups.com. >>> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sqlalchemy+unsubscr...@googlegroups.com. >> To post to this group, send email to sqlalchemy@googlegroups.com. >> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.