Robert Kuska
2016-04-20 11:13:27 UTC
Consider following code:
message Fly{
uint32 dtime = 1;
}
File "<stdin>", line 1, in <module>
File
"/home/rkuska/.local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py",
line 825, in HasField
raise ValueError(error_msg % field_name)
ValueError: Protocol message has no non-repeated submessage field
"dtime_utc"
File "<stdin>", line 1, in <module>
File
"/home/rkuska/.local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py",
line 825, in HasField
raise ValueError(error_msg % field_name)
ValueError: Protocol message has no non-repeated submessage field
"Flight.dtime_utc"
What does HasField expect as a parameter?
message Fly{
uint32 dtime = 1;
}
d.ListFields()[0][0].name
'dtime'd.ListFields()[0][0].full_name
'Fly.dtimed.HasField('dtime')
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File
"/home/rkuska/.local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py",
line 825, in HasField
raise ValueError(error_msg % field_name)
ValueError: Protocol message has no non-repeated submessage field
"dtime_utc"
d.HasField('Fly.dtime')
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File
"/home/rkuska/.local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py",
line 825, in HasField
raise ValueError(error_msg % field_name)
ValueError: Protocol message has no non-repeated submessage field
"Flight.dtime_utc"
What does HasField expect as a parameter?
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.