Skip to content

(potential) Encoding Issue with create_product_review_and_seller_feedback_solicitation #238

@marek715

Description

@marek715

Describe the bug
JSONDecodeError when using create_product_review_and_seller_feedback_solicitation

File "C:\Users\user\anaconda3\envs\py36\lib\site-packages\sp_api\base\helpers.py", line 21, in wrapper return function(*args, **kwargs) File "C:\Users\user\anaconda3\envs\py36\lib\site-packages\sp_api\api\solicitations\solicitations.py", line 70, in create_product_review_and_seller_feedback_solicitation return self._request(fill_query_params(kwargs.pop('path'), amazonOrderId), params=kwargs) File "C:\Users\user\anaconda3\envs\py36\lib\site-packages\sp_api\base\client.py", line 105, in _request return self._check_response(res) File "C:\Users\user\anaconda3\envs\py36\lib\site-packages\sp_api\base\client.py", line 109, in _check_response error = res.json().get('errors', None) File "C:\Users\user\anaconda3\envs\py36\lib\site-packages\requests\models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\user\anaconda3\envs\py36\lib\json\__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\user\anaconda3\envs\py36\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\user\anaconda3\envs\py36\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

To Reproduce

Cannot reproduce as it seems to send the solicitation correctly and I do not get the error on subsequent runs as a result.

I am sending it with this command:
res = Solicitations(credentials=credentials).create_product_review_and_seller_feedback_solicitation(oid,marketplaceIds=market_id)

Expected behavior

Not sure how to capture the JSON if I get an error in this place, but I expected the JSON in the APIResponse to decode without issues.

Desktop (please complete the following information):

Windows using Anaconda env with py3.6

Additional context

Seems like a similar error to this one:
#178

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions