You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
$ protoc --version
libprotoc 3.21.12
Language: Python
$ ~/venv/bin/python3 --version
Python 3.12.7
What operating system (Linux, Windows, ...) and version?
WSL via Windows 11. This is Ubuntu 24.10.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular
What runtime / compiler are you using (e.g., python version or gcc version)
$ ~/venv/bin/python3 --version
Python 3.12.7
What did you do?
Steps to reproduce the behavior:
I'm not really sure what is going on. I have tried two ways to create a protobuf object which contains a repeated google.protobuf.timestamp.Timestamp type.
In both cases, the objects bid, ask and timestamp are numpy.array types containing floating point values (for bid and ask) or datetime.datetimes (for timestamp).
I see the following error in both cases:
TypeError: 'Timestamp' object cannot be interpreted as an integer
I don't understand this error message. It reads as if the type BidAskTimeseries is expecting integer type for the field timestamp instead of a datetime.
I'm not sure if this is a red herring however, since it doesn't seem to make any sense.
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Language: Python
What operating system (Linux, Windows, ...) and version?
WSL via Windows 11. This is Ubuntu 24.10.
What runtime / compiler are you using (e.g., python version or gcc version)
What did you do?
Steps to reproduce the behavior:
I'm not really sure what is going on. I have tried two ways to create a protobuf object which contains a
repeated google.protobuf.timestamp.Timestamp
type.Here is my
.proto
file.The two methods I tried are:
.extend
method of a "repeated scalar container"Example 1:
Example 2:
In both cases, the objects
bid
,ask
andtimestamp
arenumpy.array
types containing floating point values (forbid
andask
) ordatetime.datetime
s (fortimestamp
).I see the following error in both cases:
I don't understand this error message. It reads as if the type
BidAskTimeseries
is expecting integer type for the fieldtimestamp
instead of adatetime
.I'm not sure if this is a red herring however, since it doesn't seem to make any sense.
The text was updated successfully, but these errors were encountered: