问题描述:

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'的更多相关文章

  1. TypeError: __init__() got an unexpected keyword argument 't_command'

    python  .\manage.py migrate 报错如下 λ python .\manage.py migrateTraceback (most recent call last): File ...

  2. 关于Jupyter Notebook无法自动补全(Autocompletion),报错TypeError: __init__() got an unexpected keyword argument 'column' 的解决方案

    关于Jupyter Notebook无法自动补全(Autocompletion),报错TypeError: __init__() got an unexpected keyword argument ...

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

  4. 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__() ...

  5. senlin __init__() got an unexpected keyword argument 'additional_headers'

    从senlin源码重新编译更新了服务,然后执行 senlin的 cli就遇到了错误: __init__() got an unexpected keyword argument 'additional ...

  6. TypeError: parse() got an unexpected keyword argument 'transport_encoding'

    错误: TypeError: parse() got an unexpected keyword argument 'transport_encoding'You are using pip vers ...

  7. TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'

    错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...

  8. TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'

    在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...

  9. TypeError: pivot_table() got an unexpected keyword argument 'rows'

    利用Python进行数据分析>第二章,处理MovieLens 1M数据集,有句代码总是报错: mean_rating = data.pivot_table('rating', rows='tit ...

随机推荐

  1. 数字签名 转载:http://www.youdzone.com/signature.html

    What is a Digital Signature?An introduction to Digital Signatures, by David Youd Bob (Bob's public k ...

  2. Modbus​协议​深入​讲解_NI

    from:https://www.ni.com/zh-cn/innovations/white-papers/14/the-modbus-protocol-in-depth.html 已​更新 Mar ...

  3. pandas中DataFrame和Series的数据去重

    在SQL语言中去重是一件相当简单的事情,面对一个表(也可以称之为DataFrame)我们对数据进行去重只需要GROUP BY 就好. select custId,applyNo from tmp.on ...

  4. py操作mongodb总结

    python使用的版本 python3. python操作mongodb使用的是pymongo,安装方法: pip install pymongo 测试 PyMongo 接下来我们可以创建一个测试文件 ...

  5. 菜鸟刷面试题(五、Java容器篇)

    目录: java 容器都有哪些? Collection 和 Collections 有什么区别? List.Set.Map 之间的区别是什么? HashMap 和 Hashtable 有什么区别? 如 ...

  6. centos 升级内核方法

    方法1:rpm安装方式 rpm安装包可以通过这个网站下载: 这个是CentOS6 x64 : http://elrepo.org/linux/kernel/el6/x86_64/RPMS/ 这个是Ce ...

  7. 018_linuxC++之_抽象类的引入

    (一)参考原文链接:C++多态 (二) 抽象类 在介绍抽象类之前,我们先介绍一下纯虚函数. 1.纯虚函数 在基类中仅仅给出声明,不对虚函数实现定义,而是在派生类中实现.这个虚函数称为纯虚函数.普通函数 ...

  8. 【线性代数】2-4:矩阵操作(Matrix Operations)

    title: [线性代数]2-4:矩阵操作(Matrix Operations) toc: true categories: Mathematic Linear Algebra date: 2017- ...

  9. Jmeter在一次进程中如何循环执行某个步骤

    在使用Jmeret工具过程中比如我使用借款功能,如果想多借几次就需要一次次执行脚本,如果我在脚本执行过程中登陆一次,可以重复执行借款这一个操作那么就方便多了 于是就用到(循环控制器)这个功能 1.我需 ...

  10. redis慢查询笔记

    慢查询 生命周期 两个配置 三个命令 运维经验 生命周期 1.发送命令 2,排队执行命令因为单线程 3.执行命令 4.返回结果 慢查询发生在第三阶段 客户端超时并不一定有慢查询,但慢查询是客户端超时的 ...