py2app 与 postgres/psycopg2

发布于 2024-11-19 18:22:53 字数 988 浏览 7 评论 0原文

所以我尝试在我的项目中使用 py2app 。现在我没有从 py2app 收到任何错误。它在接近尾声时写了以下内容:

/usr/bin/strip: for architecture x86_64 object: /Users/bogdan/Documents/TVB/tvb-root/gemenos/trunk/dist/run.app/Contents/Frameworks/libgfortran.2.dylib malformed object (load command 3 cmdsize not a multiple of 8)

但它构建了 dist/build 文件夹。但是当我尝试运行我的应用程序时,出现错误:

  File "project/core/storage/dao.pyc", line 13, in <module>
  File "sqlalchemy/engine/__init__.pyc", line 263, in create_engine
  File "sqlalchemy/engine/strategies.pyc", line 50, in create
  File "sqlalchemy/engine/url.pyc", line 116, in get_dialect

sqlalchemy.exc.ArgumentError:无法确定“postgresql+psycopg2”的方言。 2011-07-12 15:20:06.680 run[4310:10b] run Error

我尝试谷歌搜索,唯一相关的是:

http://osdir.com/ml/sqlalchemy/2011-05/msg00104.html

但我不太明白这个答案,也不知道它是否真的有帮助。

有什么建议吗?

问候, 博格丹

So I'm trying to use py2app for my project. Now I don't get any errors from py2app. It is writing near the end the following:

/usr/bin/strip: for architecture x86_64 object: /Users/bogdan/Documents/TVB/tvb-root/gemenos/trunk/dist/run.app/Contents/Frameworks/libgfortran.2.dylib malformed object (load command 3 cmdsize not a multiple of 8)

But it build the dist/build folders. But when I try to run my application I get the error:

  File "project/core/storage/dao.pyc", line 13, in <module>
  File "sqlalchemy/engine/__init__.pyc", line 263, in create_engine
  File "sqlalchemy/engine/strategies.pyc", line 50, in create
  File "sqlalchemy/engine/url.pyc", line 116, in get_dialect

sqlalchemy.exc.ArgumentError: Could not determine dialect for 'postgresql+psycopg2'.
2011-07-12 15:20:06.680 run[4310:10b] run Error

I tried googling around and the only thing related was:

http://osdir.com/ml/sqlalchemy/2011-05/msg00104.html

but I don't really understand that answer nor do I know if it actually helped at all.

Any suggestion?

Regards,
Bogdan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2024-11-26 18:22:53

这可能有帮助!我刚刚遇到了同样的问题。
找到了这个网站:(不幸的是不是英文的,但它对我有用)
http://bancaldo.altervista.org/2011/07/py2exe- errori-post-freeze/

我所做的是将包含添加到我的 .py

对于 MS SQL

from sqlalchemy.dialects.mssql.base import dialect

或 SQL lite

from sqlalchemy.dialects.sqlite.base import dialect

This may help!! I just struggled through the same problem.
Found this site: (not in english unfortunately, but it worked for me)
http://bancaldo.altervista.org/2011/07/py2exe-errori-post-freeze/

What I did was to add an include to my .py

For MS SQL

from sqlalchemy.dialects.mssql.base import dialect

Or for SQL lite

from sqlalchemy.dialects.sqlite.base import dialect
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文