成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'


温婉小蘑菇
温婉小蘑菇 2022-09-19 16:36:00 51844
分类专栏: 资讯

成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'

目录

解决问题

解决思路

解决方法


解决问题

TypeError: __init__() got an unexpected keyword argument 'serialized_options'

  1. File "object_detection/builders/model_builder_test.py", line 24, in -operator"><module-operator">>
  2. from object_detection.builders import model_builder
  3. File "F:\File_Python\Python_example\models-master-subst">\research\object_detection\builders\model_builder.py", line 20, in -operator"><module-operator">>
  4. from object_detection.builders import anchor_generator_builder
  5. File "F:\File_Python\Python_example\models-master-subst">\research\object_detection\builders\anchor_generator_builder.py", line 21, in -operator"><module-operator">>
  6. from object_detection.protos import anchor_generator_pb2
  7. File "F:\File_Python\Python_example\models-master-subst">\research\object_detection\protos\anchor_generator_pb2.py", line 15, in -operator"><module-operator">>
  8. from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
  9. File "F:\File_Python\Python_example\models-master-subst">\research\object_detection\protos\grid_anchor_generator_pb2.py", line 22, in -operator"><module-operator">>
  10. serialized_pb-operator">=_b('\n3object_detection-operator">/protos-operator">/grid_anchor_generator.proto\x12\x17object_detection.protos\"\xcd\x01-subst">\n\x13GridAnchorGenerator\x12\x13-subst">\n\x06height\x18\x01 \x01(\x05:\x03\x32\x35\x36\x12\x12-subst">\n\x05width\x18\x02 \x01(\x05:\x03\x32\x35\x36\x12\x19-subst">\n-subst">\rheight_stride\x18\x03 \x01(\x05:\x02\x31\x36\x12\x18-subst">\n\x0cwidth_stride\x18\x04 \x01(\x05:\x02\x31\x36\x12\x18-subst">\n-subst">\rheight_offset\x18\x05 \x01(\x05:\x01\x30\x12\x17-subst">\n\x0cwidth_offset\x18\x06 \x01(\x05:\x01\x30\x12\x0e-subst">\n\x06scales\x18\x07 \x03(\x02\x12\x15-subst">\n-subst">\raspect_ratios\x18\x08 \x03(\x02')
  11. TypeError: __init__() got an unexpected keyword argument 'serialized_options'

解决思路

类型错误:__init__()得到意外的关键字参数“serialized_options”

出现该问题,很有可能是,终端上的 protoc 版本 与python库内的protobuf版本不一样。

解决方法

安装对应版本的库即可!比如我的执行下列命令

pip install -U protobuf

大功告成!完美解决!

网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。

本文链接:https://www.xckfsq.com/news/show.html?id=3631
赞同 0
评论 0 条
温婉小蘑菇L0
粉丝 0 发表 6 + 关注 私信
上周热门
如何使用 StarRocks 管理和优化数据湖中的数据?  2966
【软件正版化】软件正版化工作要点  2885
统信UOS试玩黑神话:悟空  2855
信刻光盘安全隔离与信息交换系统  2743
镜舟科技与中启乘数科技达成战略合作,共筑数据服务新生态  1277
grub引导程序无法找到指定设备和分区  1244
华为全联接大会2024丨软通动力分论坛精彩议程抢先看!  169
2024海洋能源产业融合发展论坛暨博览会同期活动-海洋能源与数字化智能化论坛成功举办  168
点击报名 | 京东2025校招进校行程预告  164
华为纯血鸿蒙正式版9月底见!但Mate 70的内情还得接着挖...  161
本周热议
我的信创开放社区兼职赚钱历程 40
今天你签到了吗? 27
信创开放社区邀请他人注册的具体步骤如下 15
如何玩转信创开放社区—从小白进阶到专家 15
方德桌面操作系统 14
我有15积分有什么用? 13
用抖音玩法闯信创开放社区——用平台宣传企业产品服务 13
如何让你先人一步获得悬赏问题信息?(创作者必看) 12
2024中国信创产业发展大会暨中国信息科技创新与应用博览会 9
中央国家机关政府采购中心:应当将CPU、操作系统符合安全可靠测评要求纳入采购需求 8

加入交流群

请使用微信扫一扫!