0

I am downloading some tables from Bing using the bulk service and want to limit the amount of data according to time. In my download paramters I am using report_time_period = ['Yesterday'] but keep getting an error TypeError: __init__() got an unexpected keyword argument 'report_time_period'

here are my other parameters that seem to be working:

download_parameters = DownloadParameters(
data_scope=['EntityData'],
download_entities= ['Keywords'],
report_time_period = ['Yesterday'], #error
file_type=REPORT_FILE_FORMAT,
last_sync_time_in_utc=None,
result_file_directory = FILE_DIRECTORY,
result_file_name = DOWNLOAD_FILE_NAME,
overwrite_result_file = True,
timeout_in_milliseconds=3600000
)
db_gg
  • 129
  • 1
  • 11

1 Answers1

0

You'll need to use the SUDS factory to create PerformanceStatsDateRange. Here is a link to an example. I hope this helps!

Eric Urban
  • 582
  • 2
  • 7
  • Thanks for the help! I am now getting this error message: `There was an error while trying to deserialize parameter https://bingads.microsoft.com/CampaignManagement/v11:PerformanceStatsDateRange. The InnerException message was 'There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts.V11.PerformanceStatsDateRange. The value '' cannot be parsed as the type 'Int32'.'. Please see InnerException for more details.'` Do you know what it could be about? – db_gg Mar 07 '18 at 17:31