Python报错TypeError: 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).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

这个错误的修改比较容易,遵循第一条提示即可,降低protobuf版本。

pip install protobuf==3.19.0

也可以用镜像加快下载速度

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple protobuf==3.19.0

Python报错 TypeError: Descriptors cannot not be created directly相关推荐

  1. Python报错TypeError: Descriptors cannot not be created directly

    Python报错TypeError: Descriptors cannot not be created directly 具体错误: TypeError: Descriptors cannot no ...

  2. 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 ...

  3. TypeError: Descriptors cannot not be created directly.

    python 依赖 protobuf 奇怪报错 TypeError: Descriptors cannot not be created directly. 在使用 paddlex 时引入一些调用了 ...

  4. python报错系列一:TypeError: Descriptors cannot not be created directly.

    解决TypeError: Descriptors cannot not be created directly. pip install protobuf==3.19.0 或者 pip install ...

  5. 解决TypeError: Descriptors cannot not be created directly报错!

    完整报错如下: TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file ...

  6. Python报错TypeError: 'str' object is not callable

    原文:http://blog.sina.com.cn/s/blog_71f3890901017rsh.html Python报错TypeError: 'str' object is not calla ...

  7. python报错 TypeError: an integer is required

    问题描述: 在本地使用socket向NetAssist传送数据的时候,执行python文件后发现报出python 报错TypeError: an integer is required错误 代码: 1 ...

  8. Python报错TypeError: ‘User‘ object is not iterable

    Python报错TypeError: 'User' object is not iterable 原因 User对象是不可迭代的,我这里是因为User并不是list,所以是不可迭代的,所以不使用迭代即 ...

  9. python报错TypeError: must be str, not int

    python报错TypeError: must be str, not int 字符串拼接一个整型变量报错,代码如下 for i in range(1,586):res = 'test' + i 报错 ...

最新文章

  1. 一文快速入门分库分表中间件 Sharding-JDBC (必修课)
  2. retrofit2使用详解_秒懂Retrofit2之Converter
  3. 小电商的延时队列设计概要
  4. 关于tornado中session的总结
  5. Huffman编码解码
  6. (136)System Verilog覆盖组参数传递实例
  7. 睡前1分钟 坚持瘦下来(信不信由你)
  8. jquery api的整体解读
  9. ios正式包ipa,发布苹果应用商店App Store
  10. chrome打开链接隐私设置错误_Chrome 隐私设置错误
  11. ttl低电平接大电阻_电压不稳定?那是你不懂上拉/下拉电阻原理,5分钟教你应用!...
  12. 20个优秀手机界面扁平化设计,让你一秒看懂扁平化
  13. Java程序员掉发系列——程序员的成长之路
  14. 在自建机房给网站做ICP备案
  15. MySQL数据库中插入图片
  16. 尤雨溪告诉你为什么Vue比yox优秀
  17. win10下vs2013配置opencv2.4.11+测试代码
  18. 51单片机c语言基本结构,51单片机的内部组成及应用原理解析
  19. 【无标题】java求等腰梯形面积
  20. 6个P2P流媒体开源项目介绍

热门文章

  1. 【Vue3】图标处理方案SvgIcon
  2. 任务定义的脑网络的内在连接模式可以个体化预测精神分裂症患者的认知症状维度
  3. resnet—吴恩达
  4. Excel文件的下载
  5. 关闭word后自动打开新的文档
  6. 微信公众号 语音转文字api_原来微信不仅能实现语音转文字,还能实现文字转语音!你还不知吗...
  7. vue项目PC端屏幕分辨率与窗口大小自适应
  8. iOS UIFont 字体名字大全
  9. CorelDRAW2023新增了哪些功能?
  10. 计算机组成原理语言方框图,计算机组成原理3---方框图语言