BUG Report: attribute 'unescape' of 'HTMLParser' object has been removed since Python 3.9
walwan opened this issue · comments
Problem Description
See output below:
Traceback (most recent call last):
File "~/bili/start.py", line 2315, in
main(ip)
File "~/bili/start.py", line 1148, in main
PrintInfo.printlr(ri)
File "~/bili/PrintInfo.py", line 180, in printlr
print(f"{lan['O7']}{rhtml(d['des'])}")#简介:
File "~/bili/bstr.py", line 85, in rhtml
r=HTMLParser().unescape(r)
AttributeError: 'HTMLParser' object has no attribute 'unescape'
Reason
From bpo-37328 in Python 3.9 changelog (here), attribute 'unescape' of 'HTMLParser' object has been removed.
I just personally regard this as a bug. If you are not planning to remove code using "unescape", just close this issue.
Solution
- Use Python 3.8