Protobuf lua 错误:Protocol message tag had invalid wire type
来源:互联网 发布:中国网络在线教育 编辑:程序博客网 时间:2024/05/22 05:15
这里只列出本人遇到的情况之一
这种错误我犯了很多次了 很多都是proto文件出的问题
今天被这个protobuf搞蒙了 我弄了一晚上 才发现是一个类似于“公式背错了”的问题
老手应该不会犯这种问题 但是既然有第一个人犯过 那99%的概率就会有第二个人犯过
问题还是出现在proto文件的定义上
每个message中从1开始 而不是文件中的第一个变量从1开始
例如 正确的做法:
message kaller1
{
required int32 id = 1;
required int32 age = 2;
}
message kaller2
{
required string msg = 1;
}
错误的做法:
message kaller1
{
required int32 id = 1;
required int32 age = 2;
}
message kaller2
{
required string msg = 3;
}
这里注意一下 如果是枚举 则没有这样的问题
下面这种情况如果变量少的话是可以进行的 但是当序号达到15左右的时候 在lua ParseFromString 就会出现
Protocol message tag had invalid wire type 这种错误
本人猜想 可能是类中最多只能有10多个变量吧
之前嵌套message的问题我感觉跟这个有关 有时间去试试
阅读全文
0 0
- Protobuf lua 错误:Protocol message tag had invalid wire type
- google.protobuf.message.DecodeError: Tag had invalid wire type.
- : Invalid protocol: null错误
- Kafka Wire Protocol
- Wire Protocol Buffers介绍
- Introducing Wire Protocol Buffers
- Invalid location of tag (form) 错误
- Invalid location of tag (form) 错误
- Invalid location of tag (div) 错误
- Invalid location of tag (div) 错误
- android: invalid start tag xxxxx 错误原因
- Invalid location of tag (div) 错误
- android: invalid start tag Selector 错误原因
- iOS 使用ProtocolBuffer 时报 Protocol message end-group tag did not match expected tag.
- 关于Wire Protocol ODBC Driver
- Wire protocol buffers的使用
- What is JSON Wire Protocol?
- vs2013编译protobuf(Goole Protocol Buffers)源码错误解决方案
- pageContext内置对象可以操作哪些域对象中的数据?
- vim编辑器
- String与Int的转换
- php中is_null,isset,empty的总结
- GDI编程简易画图框架
- Protobuf lua 错误:Protocol message tag had invalid wire type
- VS toolTip1控件的使用1
- 线程的实现方式
- java字符串分割
- HightChart简单教程
- Python apk工具包
- hive 基础笔记
- 字符串中第一个只出现一次的字符
- 2018秋招 搜狐 回文数组