Skip to content

Error Parsing "Start Date" Column for BulkAssetGroup #302

@VadimSaratov

Description

@VadimSaratov

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions