小编Rah*_*ava的帖子

在 python 3.9.6 上运行时出现 AttributeError: module 'base64' has no attribute 'decodestring' 错误

问题描述:

\n

AttributeError: module 'base64' has no attribute 'decodestring'在 python 3.9.6 上运行时出现错误

\n

重现步骤:

\n

下面是一个虚拟程序,在 python 3.9.6 上运行时,我收到 `AttributeError: module 'base64' has no attribute 'decodestring'`` 错误:

\n
from ldif3 import LDIFParser\n\nparser = LDIFParser(open('dse3.ldif', 'rb'))\nfor dn, entry in parser.parse():\n    if dn == "cn=Schema Compatibility,cn=plugins,cn=config":\n        if entry['nsslapd-pluginEnabled'] == ['on']:\n            print('Entry record: %s' % dn)\n
Run Code Online (Sandbox Code Playgroud)\n

错误信息:

\n
python3.9 1.py                             \xee\x82\xb2 \xe2\x9c\x94 \xee\x82\xb3 \xef\x80\x93 \xee\x82\xb2 venvpy3.9 \xee\x9c\xbc \xee\x82\xb2 11:12:01 \xef\x80\x97\nTraceback (most recent call last):\n  File "/Users/rasrivas/local_test/1.py", line 4, in <module>\n    for …
Run Code Online (Sandbox Code Playgroud)

python ldap ldif python-3.x

13
推荐指数
2
解决办法
3万
查看次数

标签 统计

ldap ×1

ldif ×1

python ×1

python-3.x ×1