【发布时间】:2022-01-14 00:21:30
【问题描述】:
你好,在 pyinstaller 之后我的程序没有工作
File "main.py", line 16, in <module>
File "pymongo\mongo_client.py", line 677, in __init__
File "pymongo\uri_parser.py", line 532, in parse_uri
File "pymongo\srv_resolver.py", line 119, in get_hosts
File "pymongo\srv_resolver.py", line 102, in _get_srv_response_and_hosts
File "pymongo\srv_resolver.py", line 103, in <listcomp>
AttributeError: 'GenericRdata' object has no attribute 'target'
[19304] Failed to execute script 'main' due to unhandled exception!```
【问题讨论】:
-
你能展示你的代码来理解问题吗?
-
这里也有类似的问题:stackoverflow.com/a/70097128/8961170
seems that the issue is with it not picking up the pymongo's dnspython dependency, and I fixed it by specifying dns in the build options -
请提供足够的代码,以便其他人更好地理解或重现问题。
标签: python pymongo pyinstaller