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
user_id field is deprecated but it still causes us problems. TransferConfig.to_dict creates a dictionary that has the wrong type of this field. This type of this field should be one of: int, long, but this field has type str. This is especially problematic because to_dict method set this field to default value - "0", so I need to convert this field to the correct type on my side.
It would be great if TransferConfig.to_dict returned the correct representation for this object
Traceback (most recent call last):
File "/files/bigquery_dts.py", line 7, in <module>
c = TransferConfig(**b)
File "/usr/local/lib/python3.6/site-packages/proto/message.py", line 466, in __init__
self.__dict__["_pb"] = self._meta.pb(**params)
TypeError: '123' has type str, but expected one of: int, long
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered:
mik-laj
changed the title
Invalid type for user_id field after TransferConfig was converted to dictionary.
Invalid type for user_id field returned by TransferConfig.to_dict
Dec 28, 2020
vchudnov-g
added
P2
A nice-to-fix bug
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
and removed
🚨
This issue needs some love.
triage me
I really want to be triaged.
labels
Sep 13, 2021
user_id
field is deprecated but it still causes us problems.TransferConfig.to_dict
creates a dictionary that has the wrong type of this field. This type of this field should be one of:int
,long
, but this field has type str. This is especially problematic becauseto_dict
method set this field to default value -"0"
, so I need to convert this field to the correct type on my side.It would be great if
TransferConfig.to_dict
returned the correct representation for this objectEnvironment details
Python 3.6.12
pip 20.2.4
google-cloud-bigquery-datatransfer
version:google-cloud-bigquery-datatransfer==3.0.0
Steps to reproduce
Code example
Workaround:
Stack trace
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: