脚本打包后,执行连接数据库操作时闪退或一直卡着 #2177
Unanswered
2107708125
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
请参考常见问题解决方案中关于打包问题的解决方案 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
INFO Python 3.12.10
INFO Pyarmor 9.1.8 (pro)
INFO Platform windows.x86_64
我直接用下面的脚本打包之后运行也是直接闪退,不打包直接运行脚本是正常的
import mysql.connector
# 数据库配置
DB_CONFIG = {
'host': '',
'user': '',
'password': '',
'database': '',
'port': *
}
打包使用的参数
pyarmor cfg pack:pyi_options = " --add-data "dd.dll;." --add-data "pl.ico;." --uac-admin --noupx" && pyarmor gen --pack onedir --mix-str --enable-jit --obf-code 2 --private --assert-call --assert-import
打包后会生成混淆的mysql文件夹,我也尝试过将这个文件夹放到_internal里面,依旧是闪退
Beta Was this translation helpful? Give feedback.
All reactions