问题:TypeError: Descriptors cannot not be created directly.解决方法

运行代码时提示如下报错:

在这里插入图片描述

解决上面问题,直接在控制台中输入下面命令重新安装protobuf即可,如下:

pip install 'protobuf~=3.19.0'

在这里插入图片描述

以上就是解决TypeError: Descriptors cannot not be created directly.的方法,希望能帮助到有同样问题的你,谢谢!

猜你喜欢

转载自blog.csdn.net/qq_40280673/article/details/126665481
今日推荐