Descriptors cannot not be created directly
1 Descriptors cannot not be created directly
在运行诸如深度学习python等程序时,如mmdetection、mmdetection3d中的程序,会出现报错:“Descriptors cannot not be created directly”。详细报错如下:
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:1. Downgrade the protobuf package to 3.20.x or lower.2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
出现这个问题的主要原因是protobuf版本不匹配。因此,按照错误提示,用pip安装对应版本的protobuf即可,如上述问题中对应的 3.20.1版本。安装命令为:
pip install protobuf==3.20.1
2 AttributeError: type object 'DialogCode' has no attribute 'Accepted'
这个错误通常和pyQT组件版本有关,特别是在mayavi使用时会出现该错误。详细报错内容如下:
int(QtGui.QDialog.DialogCode.Accepted): OK,
AttributeError: type object 'DialogCode' has no attribute 'Accepted'
解决方式是重新安装pyqt5,即:
pip install protobuf==pyqt5
2 AttributeError: type object 'DialogCode' has no attribute 'Accepted'
这个错误通常和pyQT组件版本有关,特别是在mayavi使用时会出现该错误。详细报错内容如下:
int(QtGui.QDialog.DialogCode.Accepted): OK,
AttributeError: type object 'DialogCode' has no attribute 'Accepted'
解决方式是重新安装pyqt5,即:
pip install protobuf==pyqt5
更多三维、二维感知算法和金融量化分析算法请关注“乐乐感知学堂”微信公众号,并将持续进行更新。
Descriptors cannot not be created directly相关推荐
- TypeError: Descriptors cannot not be created directly.
python 依赖 protobuf 奇怪报错 TypeError: Descriptors cannot not be created directly. 在使用 paddlex 时引入一些调用了 ...
- python TypeError: Descriptors cannot not be created directly错误解决
运行python脚本时出现错误 TypeError: Descriptors cannot not be created directly. If this call came from a _pb2 ...
- TypeError: Descriptors cannot not be created directly解决
文章目录 问题 解决 问题 跑代码的时候遇到了这个问题: TypeError: Descriptors cannot not be created directly. If this call cam ...
- TensorFlow2.8.0报错TypeError: Descriptors cannot not be created directly.
@创建于:2022.09.28 @修改于:2022.09.28 1.错误信息 Traceback (most recent call last):File "D:\PycharmProjec ...
- import keras时遇到的错误 TypeError: Descriptors cannot not be created directly. If this call came from a _
问题描述 版本对应 keras 与 tensorflow 版本对应关系:https://master–floydhub-docs.netlify.app/guides/environments/ 本文 ...
- 关于Descriptors cannot not be created directly报错
报错信息为: TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, ...
- 09 TypeError: Descriptors cannot not be created directly.
1.问题: import yaml ModuleNotFoundError: No module named 'yaml' yaml模块的pip工具包名称不是yaml,而是pyyaml,所以不是直接p ...
- 解决:TypeError: Descriptors cannot not be created directly
我使用pip命令下载安装paddlepaddle库,具体命令如下所示,采用清华镜像源,这样下载速度更快! pip install -i https://pypi.tuna.tsinghua.edu.c ...
- Python报错 TypeError: Descriptors cannot not be created directly
Python报错TypeError: Descriptors cannot not be created directly 具体错误: TypeError: Descriptors cannot no ...
最新文章
- yolo如何降低loss_从未看过如此通俗易懂的YOLO系列
- NLTK命名实体识别NER
- 实战SSM_O2O商铺_31【商品】商品添加之View层的实现
- 简明docker教程 1
- javaweb学习总结(五):Servlet开发(一)
- Codeforces Round #588 (Div. 2) D. Marcin and Training Camp 思维
- Intel 64/x86_64/IA-32/x86处理器通用寄存器 (2) - 64位通用寄存器
- 一行能装逼的JavaScript代码,就是怎么sao
- ios app开发简单实例--源代码管理的基本操作
- 3.13PMP试题每日一题
- java基础总结06-常用api类-System类常用方法
- python将输出结果写入csv_Python怎么把输出整体写入CSV文件
- C++解析char *p与char p[]
- 字节跳动A/B实验背后的秘密:样本量计算
- Git 常用回滚撤销命令总结
- 【关于听任大佬的讲话的深刻感悟】
- Apple 授权登录
- Nodejs+express+vue+Elementui酒店客房管理系统
- 计算机整体硬盘销毁,如何完全销毁硬盘上的数据?
- glDrawElements 绘制立方体共用顶点的法线和UV处理