-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
When attempting to download and parse the BulkAssetGroup
object, the SDK throws an error related to the Start Date
column.
[ERROR] [BulkServiceManager.EntityReadException] Couldn't parse column Start Date of <class 'bingads.v13.bulk.entities.bulk_asset_group.BulkAssetGroup'> entity: unconverted data remains: 00:00:00 See ColumnValues for detailed row information and InnerException for error details.
It cannot process the Start Date
column when the format is YYYY-MM-DD HH:MM:SS
. It appears the BulkAssetGroup
expects the date format to be YYYY-MM-DD
Probably the same issue with End Date
Or is it a bug with CSV generation?
If the issue is the date format, then
Suggested Fix:
Update the BulkAssetGroup
to handle datetime formats in the Start Date
and End Date
columns.
_SimpleBulkMapping(
header=_StringTable.StartDate,
field_to_csv=lambda c: bulk_datetime_str(c.asset_group.StartDate),
csv_to_field=lambda c, v: setattr(c.asset_group, 'StartDate', parse_datetime(v))
),
_SimpleBulkMapping(
header=_StringTable.EndDate,
field_to_csv=lambda c: bulk_datetime_str(c.asset_group.EndDate),
csv_to_field=lambda c, v: setattr(c.asset_group, 'EndDate', parse_datetime(v))
),
Environment:
- SDK Version: v13.0.21.2
- Python Version: Python 3.11
Let me know if you'd like any further refinements!
Metadata
Metadata
Assignees
Labels
No labels