Closed 19819068211 closed 2 years ago
已经修复,变量名和内置函数冲突了
使用了最新的可还是这样报错
检查你的python版本
python版本3.8,应该满足3.6以上了,请问哪个版本的python可以支持,谢谢
python版本3.8,应该满足3.6以上了,请问哪个版本的python可以支持,谢谢
我理解了,这里用了 Py 3.9 的一个类型注解特性 GenericAlias 类型 所以低版本会报错,把注解中的dict
改为typing.Dict
就解决了
不好意思再次打扰,又有报错
items: list[dict] TypeError: 'type' object is not subscriptable
def get(self, index: int=0) -> tuple[str, str]: TypeError: 'type' object is not subscriptable
大佬,请问如下报错应如何处理,谢谢 C:\Users\jl\Downloads\xuexiaoyi-to-xuexitong-tampermonkey-proxy-main>python app.py Traceback (most recent call last): File "app.py", line 11, in
import cxsecret_font
File "C:\Users\jl\Downloads\xuexiaoyi-to-xuexitong-tampermonkey-proxy-main\cxsecret_font.py", line 19, in
class FontHashDAO:
File "C:\Users\jl\Downloads\xuexiaoyi-to-xuexitong-tampermonkey-proxy-main\cxsecret_font.py", line 21, in FontHashDAO
char_map: dict[str, str] # unicode -> hsah
TypeError: 'type' object is not subscriptable