createReportResponse = ReportsV2(credentials = credentials
, marketplace = my_marketplace).create_report(
reportType="GET_VENDOR_SALES_DIAGNOSTIC_REPORT",
dataStartTime = '2022-04-04',
dataEndTime = '2022-04-04'
)
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The curious thing about the error is that, the occurrence is intermittent, and we have been seeing it only since the last couple of days. Therefore, we are finding it quite difficult to reproduce this. Most probably looks like an issue from Amazon end while trying to JSONify the response received from their end.
JSONDecodeError Traceback (most recent call last)
<command-806579102930794> in <module>
----> 1 createReportResponse = ReportsV2(credentials = credentials
2 , marketplace = my_marketplace).create_report(
3 reportType="GET_VENDOR_SALES_DIAGNOSTIC_REPORT",
4 dataStartTime = argStartDate,
5 dataEndTime = argEndDate
/databricks/python/lib/python3.8/site-packages/sp_api/base/helpers.py in wrapper(*args, **kwargs)
17 'method': method
18 })
---> 19 return function(*args, **kwargs)
20
21 wrapper.__doc__ = function.__doc__
/databricks/python/lib/python3.8/site-packages/sp_api/api/reports/reports.py in create_report(self, **kwargs)
112 if isinstance(kwargs.get('dataEndTime', None), datetime):
113 kwargs.update({'dataEndTime': kwargs.get('dataEndTime').isoformat()})
--> 114 return self._request(kwargs.pop('path'), data=kwargs)
115
116 @sp_endpoint('/reports/2021-06-30/reports/{}', method='DELETE')
/databricks/python/lib/python3.8/site-packages/sp_api/base/client.py in _request(self, path, data, params, headers, add_marketplace)
127 auth=self._sign_request(),
128 proxies=self.proxies)
--> 129 return self._check_response(res)
130
131 def _check_response(self, res) -> ApiResponse:
/databricks/python/lib/python3.8/site-packages/sp_api/base/client.py in _check_response(self, res)
136 js = {'status_code': res.status_code}
137 else:
--> 138 js = res.json() or {}
139 if isinstance(js, list):
140 js = js[0]
/databricks/python/lib/python3.8/site-packages/requests/models.py in json(self, **kwargs)
898 # used.
899 pass
--> 900 return complexjson.loads(self.text, **kwargs)
901
902 @property
/usr/lib/python3.8/json/__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
355 parse_int is None and parse_float is None and
356 parse_constant is None and object_pairs_hook is None and not kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:
359 cls = JSONDecoder
/usr/lib/python3.8/json/decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
/usr/lib/python3.8/json/decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Hi Team,
I have been facing the below error while trying to invoke the create_report API for Reports.
The curious thing about the error is that, the occurrence is intermittent, and we have been seeing it only since the last couple of days. Therefore, we are finding it quite difficult to reproduce this. Most probably looks like an issue from Amazon end while trying to JSONify the response received from their end.
Please find the complete stack trace below: