TypeError: __init__() got an unexpected keyword argument 'serialized_options'
问题描述:
TypeError: __init__() got an unexpected keyword argument 'serialized_options'
File "object_detection/builders/model_builder_test.py", line 24, in <module>
from object_detection.builders import model_builder
File "F:\File_Python\Python_example\models-master\research\object_detection\builders\model_builder.py", line 20, in <module>
from object_detection.builders import anchor_generator_builder
File "F:\File_Python\Python_example\models-master\research\object_detection\builders\anchor_generator_builder.py", line 21, in <module>
from object_detection.protos import anchor_generator_pb2
File "F:\File_Python\Python_example\models-master\research\object_detection\protos\anchor_generator_pb2.py", line 15, in <module>
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "F:\File_Python\Python_example\models-master\research\object_detection\protos\grid_anchor_generator_pb2.py", line 22, in <module>
serialized_pb=_b('\n3object_detection/protos/grid_anchor_generator.proto\x12\x17object_detection.protos\"\xcd\x01\n\x13GridAnchorGenerator\x12\x13\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19\n\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18\n\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e\n\x06scales\x18\x07 \x03(\x02\x12\x15\n\raspect_ratios\x18\x08 \x03(\x02')
TypeError: __init__() got an unexpected keyword argument 'serialized_options'
解决方法:
类型错误:__init__()得到意外的关键字参数“serialized_options”
出现该问题,很有可能是,终端上的 protoc 版本 与python库内的protobuf版本不一样。
安装对应版本的库即可!比如我的执行下列命令
pip install -U protobuf
pip安装时-U参数是什么作用?
pip install -h
就有说明了,就是--upgrade
,意思是如果已安装就升级到最新版。-U 是升级 原来已经安装的包,如果有新版本,不带U不会装新版,带上才会更新到最新版本。
大功告成!完美解决!
TypeError: __init__() got an unexpected keyword argument 'serialized_options'的更多相关文章
- TypeError: __init__() got an unexpected keyword argument 't_command'
python .\manage.py migrate 报错如下 λ python .\manage.py migrateTraceback (most recent call last): File ...
- 关于Jupyter Notebook无法自动补全(Autocompletion),报错TypeError: __init__() got an unexpected keyword argument 'column' 的解决方案
关于Jupyter Notebook无法自动补全(Autocompletion),报错TypeError: __init__() got an unexpected keyword argument ...
- Anacoda下报错conda command not found 以及TypeError: __new__() got an unexpected keyword argument 'serialized_options'
在anacoda安装完成后,执行conda list命令,显示command not found 解决方法: 对于anaconda 2 , 输入export PATH=~/anaconda2/bin ...
- Django2.0——django-filter: TypeError at *** __init__() got an unexpected keyword argument 'name'
在使用 Django2.0 版本的 Django Rest Framwork 时,Django DeBug 报错 django-filter: TypeError at *** __init__() ...
- senlin __init__() got an unexpected keyword argument 'additional_headers'
从senlin源码重新编译更新了服务,然后执行 senlin的 cli就遇到了错误: __init__() got an unexpected keyword argument 'additional ...
- TypeError: parse() got an unexpected keyword argument 'transport_encoding'
错误: TypeError: parse() got an unexpected keyword argument 'transport_encoding'You are using pip vers ...
- TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'
错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...
- TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'
在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...
- TypeError: pivot_table() got an unexpected keyword argument 'rows'
利用Python进行数据分析>第二章,处理MovieLens 1M数据集,有句代码总是报错: mean_rating = data.pivot_table('rating', rows='tit ...
随机推荐
- vulkan asynchronous compute
https://www.youtube.com/watch?v=XOGIDMJThto https://www.khronos.org/assets/uploads/developers/librar ...
- fwrite() and UTF8 转载
4 down vote If you know the data is in UTF8 than you want to set up the header. I wrote a solution a ...
- 01 salt平台,软件架构图
1.前期调研 1.别人家的 https://www.cnblogs.com/ssyfj/p/9060367.html#top https://www.cnblogs.com/evilliu/artic ...
- python--批量修改文件夹名
python代码如下: import os , re import os.path rootdir = r'C:\Users\Administrator\Desktop\222' # rootdir ...
- PHP mysqli_multi_query() 函数
实例 执行多个针对数据库的查询: <?php $con=mysqli_connect("localhost","my_user","my_pas ...
- JVM(十二),垃圾回收面试题
十二.垃圾回收面试题 1.Object的finalize()方法 2.Java中的强软弱虚四种引用 (1)强引用 (2)软引用(间接引用) (3)弱引用 (4)虚引用 (5)四种引用区别
- 洛谷P2135 方块消除
洛谷题目链接 动态规划(真毒瘤!) 变量声明: $val[i]$:表示第$i$块颜色 $num[i]$:表示第$i$块颜色数量 $sum[i]$:表示$num$的前缀和 我们设计状态$f[l][r][ ...
- 2019CCPC秦皇岛自我反省&部分题解
练了一年半了,第一次打CCPC,险些把队友坑了打铁,最后也是3题危险捡了块铜. 非常水的点双连通,我居然不相信自己去相信板子,唉,结果整来整去,本来半个小时能出的题,整到了3个小时,大失误呀,不然就可 ...
- 利用django框架,手把手教你搭建数据可视化系统(一)
如何使用django去构建数据可视化的 web,可视化的结果可以呈现在web上. 使用django的MTV模型搭建网站 基础铺垫-MTV模型 Created with Raphaël 2.1.0Req ...
- Vue 使用百度地图组件
npm 安装 npm install vue-baidu-map --save组件官网地址 https://dafrok.github.io/vue-baidu-map/#/