问题描述:
\nAttributeError: module 'base64' has no attribute 'decodestring'在 python 3.9.6 上运行时出现错误
重现步骤:
\n下面是一个虚拟程序,在 python 3.9.6 上运行时,我收到 `AttributeError: module 'base64' has no attribute 'decodestring'`` 错误:
\nfrom 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)\nRun Code Online (Sandbox Code Playgroud)\n错误信息:
\npython3.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)