singer-io / tap-bing-ads

A Singer.io tap for extracting data from the Bing Ads API
GNU Affero General Public License v3.0
13 stars 30 forks source link

'CountryOrRegion' cannot be deserialized when using GeographicPerformanceReport #7

Closed briansloane closed 6 years ago

briansloane commented 6 years ago

The following error occurs when running the GeographicPerformanceReport:

2018-01-16 18:26:12,851Z    tap - CRITICAL 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/Reporting/v11:ReportRequest. The InnerException message was 'Invalid enum value 'CountryOrRegion' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.GeographicPerformanceReportColumn'. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.'.  Please see InnerException for more details.'
2018-01-16 18:26:12,869Z    tap - Traceback (most recent call last):
2018-01-16 18:26:12,870Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/transport/http.py", line 82, in send
2018-01-16 18:26:12,870Z    tap -     fp = self.u2open(u2request)
2018-01-16 18:26:12,870Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/transport/http.py", line 132, in u2open
2018-01-16 18:26:12,870Z    tap -     return url.open(u2request, timeout=tm)
2018-01-16 18:26:12,870Z    tap -   File "/usr/lib/python3.5/urllib/request.py", line 472, in open
2018-01-16 18:26:12,870Z    tap -     response = meth(req, response)
2018-01-16 18:26:12,871Z    tap -   File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
2018-01-16 18:26:12,871Z    tap -     'http', request, response, code, msg, hdrs)
2018-01-16 18:26:12,871Z    tap -   File "/usr/lib/python3.5/urllib/request.py", line 510, in error
2018-01-16 18:26:12,871Z    tap -     return self._call_chain(*args)
2018-01-16 18:26:12,871Z    tap -   File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
2018-01-16 18:26:12,872Z    tap -     result = func(*args)
2018-01-16 18:26:12,872Z    tap -   File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
2018-01-16 18:26:12,872Z    tap -     raise HTTPError(req.full_url, code, msg, hdrs, fp)
2018-01-16 18:26:12,872Z    tap - urllib.error.HTTPError: HTTP Error 500: Internal Server Error
2018-01-16 18:26:12,872Z    tap - 
2018-01-16 18:26:12,872Z    tap - During handling of the above exception, another exception occurred:
2018-01-16 18:26:12,873Z    tap - 
2018-01-16 18:26:12,873Z    tap - Traceback (most recent call last):
2018-01-16 18:26:12,873Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/client.py", line 613, in send
2018-01-16 18:26:12,873Z    tap -     reply = self.options.transport.send(request)
2018-01-16 18:26:12,873Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/transport/https.py", line 66, in send
2018-01-16 18:26:12,873Z    tap -     return HttpTransport.send(self, request)
2018-01-16 18:26:12,874Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/transport/http.py", line 94, in send
2018-01-16 18:26:12,874Z    tap -     raise TransportError(e.msg, e.code, e.fp)
2018-01-16 18:26:12,874Z    tap - suds.transport.TransportError: Internal Server Error
2018-01-16 18:26:12,874Z    tap - 
2018-01-16 18:26:12,874Z    tap - During handling of the above exception, another exception occurred:
2018-01-16 18:26:12,875Z    tap - 
2018-01-16 18:26:12,875Z    tap - Traceback (most recent call last):
2018-01-16 18:26:12,875Z    tap -   File "tap-env/bin/tap-bing-ads", line 11, in <module>
2018-01-16 18:26:12,875Z    tap -     sys.exit(main())
2018-01-16 18:26:12,875Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 761, in main
2018-01-16 18:26:12,875Z    tap -     raise exc
2018-01-16 18:26:12,876Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 758, in main
2018-01-16 18:26:12,876Z    tap -     main_impl()
2018-01-16 18:26:12,876Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 751, in main_impl
2018-01-16 18:26:12,876Z    tap -     do_sync_all_accounts(account_ids, args.catalog)
2018-01-16 18:26:12,876Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 738, in do_sync_all_accounts
2018-01-16 18:26:12,876Z    tap -     sync_account_data(account_id, catalog, selected_streams)
2018-01-16 18:26:12,877Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 726, in sync_account_data
2018-01-16 18:26:12,877Z    tap -     sync_reports(account_id, catalog)
2018-01-16 18:26:12,877Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 719, in sync_reports
2018-01-16 18:26:12,877Z    tap -     sync_report(client, account_id, report_stream)
2018-01-16 18:26:12,877Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 699, in sync_report
2018-01-16 18:26:12,878Z    tap -     request_id = client.SubmitGenerateReport(report_request)
2018-01-16 18:26:12,878Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_bing_ads/__init__.py", line 64, in wrapper
2018-01-16 18:26:12,878Z    tap -     return service_method(*args, **kwargs)
2018-01-16 18:26:12,878Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/bingads/service_client.py", line 269, in __call__
2018-01-16 18:26:12,878Z    tap -     raise ex
2018-01-16 18:26:12,878Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/bingads/service_client.py", line 261, in __call__
2018-01-16 18:26:12,878Z    tap -     response = self.service_client.soap_client.service.__getattr__(self.name)(*args, **kwargs)
2018-01-16 18:26:12,879Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/client.py", line 521, in __call__
2018-01-16 18:26:12,879Z    tap -     return client.invoke(args, kwargs)
2018-01-16 18:26:12,879Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/client.py", line 581, in invoke
2018-01-16 18:26:12,879Z    tap -     result = self.send(soapenv)
2018-01-16 18:26:12,879Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/client.py", line 619, in send
2018-01-16 18:26:12,880Z    tap -     description=tostr(e), original_soapenv=original_soapenv)
2018-01-16 18:26:12,880Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/suds/client.py", line 670, in process_reply
2018-01-16 18:26:12,880Z    tap -     raise WebFault(fault, replyroot)
2018-01-16 18:26:12,880Z    tap - suds.WebFault: 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/Reporting/v11:ReportRequest. The InnerException message was 'Invalid enum value 'CountryOrRegion' cannot be deserialized into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.GeographicPerformanceReportColumn'. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.'.  Please see InnerException for more details.'
briansloane commented 6 years ago

Similarly, when running the SearchQueryPerformanceReport an error occurs trying to deserialize Status into type 'Microsoft.AdCenter.Advertiser.Reporting.Api.DataContracts.Enum.SearchQueryPerformanceReportColumn'.