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 ...
随机推荐
- redis序列化和反序列化
RedisTemplate中需要声明4种serializer,默认为“JdkSerializationRedisSerializer”: 1) keySerializer :对于普通K-V操作时,ke ...
- 编译vim8
1.获取最新的vim源码 $ wget https://codeload.github.com/vim/vim/tar.gz/v8.1.2256 2.解压缩 $ tar -xvzf vim-8.1.2 ...
- mysql关于索引的一些零碎知识点(持续更新)
1.is null可以使用索引(网上很多文章存在误导,这个确实可以使用索引),is not null无法使用索引. 2.为什么重复数据较多的列不适合使用索引? 假如索引列TYPE有5个键值,如果有1万 ...
- 图像傅里叶变换(快速傅里叶变换FFT)
学习DIP第7天,图像傅里叶变换 转载请标明出处:http://blog.csdn.net/tonyshengtan,欢迎大家转载,发现博客被某些论坛转载后,图像无法正常显示,无法正常表达本人观点,对 ...
- 使用ImageProcessor、CodeCarvings.Piczard组件生成缩略图和添加水印
技术栈: 1.ImageProcessor(专业图像处理,不能合成水印,NetCore中有它的升级版ImageSharp目前是预览包) 2.CodeCarvings.Piczard(缩略图,水印都能搞 ...
- NSNull
集合中是不能放nil值的,因为nil是结尾,但是为了存放表示什么都没有的值,可以使用NSNull,它也是NSObject的一个子类. void null(){ NSNull *nl=[NSNull n ...
- HA 模式 Hadoop+ZooKeeper+Hbase启动顺序
一. 背景(原http://blog.csdn.net/u011414200/article/details/50437356 ,对其进行了一定更改) 1.1 网络上的大部分教程 都是机器间含有SSH ...
- Android学习_注意事项
一. Fragment中加载ListView public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle ...
- 3.rabbitmq--发布订阅模式
rabbitmq-----发布订阅模式 模型组成 一个消费者Producer,一个交换机Exchange,多个消息队列Queue,多个消费者Consumer 一个生产者,多个消费者,每一个消费者都有 ...
- Spring学习随笔(2):Eclipse下Spring环境配置+入门项目
1 准备工作 (按需下载) Eclipse 下载:http://www.eclipse.org/downloads/eclipse-packages/ : Spring 下载:http://repo. ...