python - TypeError:类型“types.GenericAlias”不是可接受的基本类型
问题描述
好的,所以我将我的 python 项目编译成一个可执行文件,它可以在我的计算机上运行,但我将它发送给几个朋友进行测试,他们都得到了这个错误。我以前从未见过这样的错误。我使用 Nuitka 编译代码。
Traceback (most recent call last): File "C:\Python39\lib\inspect.py", line 35, in <module> import ast File "C:\Python39\lib\ast.py", line 29, in <module> from contextlib import contextmanager, nullcontext File "C:\Python39\lib\contextlib.py", line 4, in <module> import _collections_abc File "C:\Python39\lib_collections_abc.py", line 416, in <module> class _CallableGenericAlias(GenericAlias): TypeError: type 'types.GenericAlias' is not an acceptable base type`
解决方案
推荐阅读
- java - Primefaces LineChart 未显示正确的日期值(谷歌浏览器)
- android - 导出 .apk 文件时出现问题(无法访问数字证书 - 无法加载证书)
- yii2 - 如何在 Yii2 中重置模型以添加新/下一条记录?
- git - git-flow 在提高 MR 进行代码审查时是不是有点模棱两可?
- java - 使用 Java Hibernate 从 MySQL 数据库中检索多行并将其存储在变量中
- java - 类文件中的 InnerClass 属性有什么用?
- c# - 如何在 Unity 中使用 C# 代码在移动设备上工作?
- c# - serializedObject 变为 null 错误
- python - 如何创建一个新列,将前 5 行和剩余的行合并为杂项?
- c++ - 使用模板向上转换 unique_ptr