【异常处理】TypeError: __new__() got an unexpected keyword argument ‘serialized_options‘
执行pointpillars的模型转时报了一个关于protobuf的错误:
nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ python3 hive_convert.py
/home/nvidia/.local/lib/python3.6/site-packages/skcuda/cublas.py:284: UserWarning: creating CUBLAS context to get version number
warnings.warn('creating CUBLAS context to get version number')
Traceback (most recent call last):
File "hive_convert.py", line 8, in <module>
from hive_context import PointPillarsContext
File "/home/nvidia/hive_pointpillars/second/pytorch/hive_context.py", line 8, in <module>
from second.builder import target_assigner_builder,voxel_builder
File "/home/nvidia/hive_pointpillars/second/builder/target_assigner_builder.py", line 4, in <module>
from second.protos import target_pb2, anchors_pb2
File "/home/nvidia/hive_pointpillars/second/protos/target_pb2.py", line 15, in <module>
from second.protos import anchors_pb2 as second_dot_protos_dot_anchors__pb2
File "/home/nvidia/hive_pointpillars/second/protos/anchors_pb2.py", line 22, in <module>
serialized_pb=_b('\n\x1bsecond/protos/anchors.proto\x12\rsecond.protos\"\xa2\x01\n\x12\x41nchorGeneratorOld\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\x11\n\tbev_range\x18\x02 \x03(\x02\x12\x17\n\x0f\x61nchor_center_z\x18\x03 \x01(\x02\x12\x14\n\x0c\x61nchor_sizes\x18\x04 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x05 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x06 \x01(\x02\"\xa7\x01\n\x15\x41nchorGeneratorStride\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x0f\n\x07strides\x18\x03 \x03(\x02\x12\x0f\n\x07offsets\x18\x04 \x03(\x02\x12\x11\n\trotations\x18\x05 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x06 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x07 \x01(\x02\"\x9b\x01\n\x14\x41nchorGeneratorRange\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x15\n\ranchor_ranges\x18\x03 \x03(\x02\x12\x11\n\trotations\x18\x04 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x05 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x06 \x01(\x02\"\x82\x02\n\x19\x41nchorGeneratorCollection\x12G\n\x17\x61nchor_generator_stride\x18\x01 \x01(\x0b\x32$.second.protos.AnchorGeneratorStrideH\x00\x12\x45\n\x16\x61nchor_generator_range\x18\x02 \x01(\x0b\x32#.second.protos.AnchorGeneratorRangeH\x00\x12\x41\n\x14\x61nchor_generator_old\x18\x03 \x01(\x0b\x32!.second.protos.AnchorGeneratorOldH\x00\x42\x12\n\x10\x61nchor_generator\"\xa8\x01\n\x16\x41nchorGenerator_depara\x12\x12\n\nclass_name\x18\x01 \x01(\t\x12\r\n\x05sizes\x18\x02 \x03(\x02\x12\x0f\n\x07strides\x18\x03 \x03(\x02\x12\x0f\n\x07offsets\x18\x04 \x03(\x02\x12\x11\n\trotations\x18\x05 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x06 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x07 \x01(\x02\"z\n\x11\x41nchorGeneratorV1\x12\x17\n\x0f\x61nchor_center_z\x18\x01 \x01(\x02\x12\x14\n\x0c\x61nchor_sizes\x18\x02 \x03(\x02\x12\x19\n\x11matched_threshold\x18\x03 \x01(\x02\x12\x1b\n\x13unmatched_threshold\x18\x04 \x01(\x02\x62\x06proto3')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
怀疑是protobuf版本过低的问题,检查一下版本。
nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ pip3 list|grep -i protobuf
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
protobuf (3.0.0)
当前版本为3.0.0,尝试升级到最新版本。
nvidia@nvidia-desktop:~/hive_pointpillars/second/pytorch$ pip3 install -U protobuf
Collecting protobuf
Downloading https://files.pythonhosted.org/packages/d5/e0/20ba06eb42155cdb4c741e5caf9946e4569e26d71165abaecada18c58603/protobuf-3.17.3-py2.py3-none-any.whl (173kB)
100% |████████████████████████████████| 174kB 833kB/s
Collecting six>=1.9 (from protobuf)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Installing collected packages: six, protobuf
Successfully installed protobuf-3.17.3 six-1.16.0
完美解决!!
【异常处理】TypeError: __new__() got an unexpected keyword argument ‘serialized_options‘相关推荐
- ObjectDetecionAPI TypeError: __new__() got an unexpected keyword argument 'serialized_options'
转载地址:https://stackoverflow.com/questions/50338968/objectdetecionapi-typeerror-new-got-an-unexpected- ...
- TensorFlow升级新版本后TypeError: __new__() got an unexpected keyword argument 'serialized_options'
环境: win7+python3.6+tensorflow 1.12 升级到1.12版本后,导入TensorFlow报错 解决办法: pip install -U protobuf
- 成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options' 目录 解决问题 解决思路 解决方法 ...
- TensorFlow错误:TypeError: __init__() got an unexpected keyword argument 'serialized_options'
用了好久的时间搞定了机器学习,今天想搞一搞深度学习,用TensorFlow的过程中却遇到了错误: Traceback (most recent call last):File "F:/编程/ ...
- 解决typeError: init() got an unexpected keyword argument ‘serialized_options’
解决typeError: init() got an unexpected keyword argument 'serialized_options' 问题描述:运行python文件时,手贱捣鼓了一下 ...
- import tensorflow 出错TypeError: init() got an unexpected keyword argument 'serialized_options'
博主在import tensorflow 的时候,出现如下错误: >>> import tensorflow as tf Traceback (most recent call la ...
- TypeError: __init__() got an unexpected keyword argument #34serialized_options #34
TypeError: __init__() got an unexpected keyword argument 'serialized_options' TypeError: __init__() ...
- flask_sqlalchemy连接Mysql报TypeError: create_engine() got an unexpected keyword argument 'encoding'解决办法
最近在使用flask_sqlalchemy连接mysql,但是遇到一个很奇葩的问题,代码如下: #-*-coding:utf-8 -*-from flask_sqlalchemy import SQL ...
- 成功解决TypeError: read_excel() got an unexpected keyword argument ‘parse_cols or ‘sheetname‘
成功解决TypeError: read_excel() got an unexpected keyword argument 'parse_cols' TypeError: read_excel() ...
最新文章
- 十分钟成为 TiDB Contributor,还送限量版马克杯
- 三年深入探索,网易云信让在线医疗做到技术“在线”
- BZOJ3511: 土地划分
- 【LightOJ - 1079】Just another Robbery(概率dp,概率背包)
- python安装轮子_如何安装这个轮子?
- 微服务治理框架的选择:对比Spring Cloud和Istio
- C++高级教程之多线程
- laravel的blade模板的布局嵌套
- Android通讯录(一)
- bulk insert 总结
- 2020.11.18 比赛总结题解合集
- 信息学奥赛一本通 提高篇
- 115、神州数码交换机配置基本命令
- 现代大学英语精读第二版(第四册)学习笔记(原文及全文翻译)——5B - Could You Live with Less(你可以简朴地生活吗)
- 项目进度管理+项目成本管理
- Nginx报错:nginx: [error] invalid PID number in /run/nginx.pid的解决方案
- OSI 的七层模型有哪些?
- stm32cubemx hal学习记录:SPI W25Q64
- Pycharm中运行yolov5-pytorch出现错误:AttributeError: ‘Hardswish‘ object has no attribute ‘inplace‘
- Codeforces Round 862 (Div. 2) 题解