simonpacis / AmazonFlexUnlimitedSUPERCHARGED

Automate the process of grabbing job blocks from Amazon Flex
23 stars 9 forks source link

Issue with Python #3

Open lpcs007 opened 1 year ago

lpcs007 commented 1 year ago

First I would like to thank the developers involved. The code works fine and I'm working on some great blocks with it.

However, when the script is running for many hours I get the following error

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\AmazonFlexUnlimitedSUPERCHARGED\app.py", line 15, in <module>
    flexUnlimited.run()
  File "C:\AmazonFlexUnlimitedSUPERCHARGED\lib\FlexUnlimited.py", line 525, in run
    Log.error(offersResponse.json(), self)
              ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 1 column 5 (char 4)

Then I start the script again and everything works fine again for a few more hours.

I believe the error is related to my Python. However, I recently installed it just to make the script work.

Any suggestions for the reason for the error?