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 ...
随机推荐
- Java笔记(基础第二篇)
声明数组 数组元素类型 数组名字[]; 数组元素类型[] 数组名字; 分配内存空间 数组名字 = new 数组元素类型[数组元素的个数] 其中使用new关键字为数组分配内存时,数组中各个元素的初始化值 ...
- BZOJ 2527 [Poi2011]Meteors (整体二分+树状数组)
整体二分板题,没啥好讲的-注意是个环-还有所有贡献会爆longlong,那么只要在加之前判断一下有没有达到需要的值就行了- CODE #include <set> #include < ...
- vue 解析时表达式闪烁的问题
现象: 在使用 vuejs.angularjs 开发时,经常会遇见浏览器页面闪现表达式 ({{ express }} ), 或者是模块(div)的闪烁. 原因: 由于 JavaScript 去操作DO ...
- Verilog写入变量值到文件语句
integer signed fid_out1,fid_out2; initial begin fid_out1 = $fopen("dataout_i.txt","w& ...
- Python一等函数
一等对象 一等对象的定义: (1)在运行时创建 (2)能赋值给变量或数据结构中的元素 (3)能作为参数传给函数 (4)能作为函数的返回结果 ▲ Python中,整数.字符串和字典.函数都是一等对象. ...
- 最大的矩形(CCF)
问题描述 在横轴上放了n个相邻的矩形,每个矩形的宽度是1,而第i(1 ≤ i ≤ n)个矩形的高度是hi.这n个矩形构成了一个直方图.例如,下图中六个矩形的高度就分别是3, 1, 6, 5, 2, 3 ...
- 【HTTP】无状态无连接的含义
无连接:服务器处理完客户的请求,并收到客户的应答后,即断开连接. 早期这么做的原因是HTTP协议产生于互联网,因此服务器需要处理同时面向全世界数十万.上百万客户端的网页访问,但每个客户端(即浏览器)与 ...
- 【CUDA 基础】6.3 重叠内和执行和数据传输
title: [CUDA 基础]6.3 重叠内和执行和数据传输 categories: - CUDA - Freshman tags: - 深度优先 - 广度优先 toc: true date: 20 ...
- 论一种基于JS技术的WEB前端动态生成框图的方法
前言 HTML是一种标记语言,由HTML的标签元素和文本编写的文档可被浏览器描述为一幅网页.通常情况下网页的实现是由HTML.CSS和Javascript三者结合完成的,HTML负责网页的结构,CSS ...
- C++ STL——C++容器的共性和相关概念
目录 一 STL容器共性机制 二 STL容器的使用场合 三 函数对象 四 谓词 五 内建函数对象 六 函数对象适配器 注:原创不易,转载请务必注明原作者和出处,感谢支持! 注:内容来自某培训课程,不一 ...