BingAds / BingAds-Python-SDK

Other
116 stars 162 forks source link

DateTime Parse Error with Bingads 13.0.7 #175

Closed cyface closed 3 years ago

cyface commented 3 years ago

Hello! starting on 12-Feb-2021, we are seeing this error regularly:

Server raised fault: 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/CampaignManagement/v13:OfflineConversions. The InnerException message was 'There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts.V13.OfflineConversion[]. The value '2021-01-22 11:59:03.000' cannot be parsed as the type 'DateTime'.'. Please see InnerException for more details.'

From what we can tell that datetime format is correct...and we haven't changed anything...so we are unclear what is wrong here.

Thank you!

Tim

qitia commented 3 years ago

could you please share the trackingid/requestid, which can be found from the response. That will help us to address the issue.

cyface commented 3 years ago

@qitia Here you go!

suds.WebFault: Server raised fault: 'Invalid client data. Check the SOAP fault details for more information. TrackingId: 8b78c713-9a6b-4f3d-8777-c5fb8fa4136e.'

qitia commented 3 years ago

Hi @cyface , could you please also share when did you make the call and on which ENV(prod or sandbox)? I searched 60days log but not found this tracking id. Would you please try repro again and share the trackingid and datetime?

qitia commented 3 years ago

@cyface, Can you please also share the code you construct the offline conversion? per https://www.w3.org/TR/NOTE-datetime the datetime '2021-01-22 11:59:03.000' is not in a valid format - there should be a 'T' between date and time. But I do not know how this could happen suddenly from Feb/12..

cyface commented 3 years ago

Thanks for that info! We were passing through the value from our click captures, which does not have that T in there...and never has.

offline_conversion.ConversionTime = conversion["Conversion Time"]

We changed it to: offline_conversion.ConversionTime = datetime_conversion_time.isoformat() and it seems to be happy now.

Not sure what changed..but at least we have a path forward now. Thank you!