mr-karan / swiggy-analytics

Analyse your swiggy orders 🍔

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swiggy-analytics not able to fetch the orders

Anirudh-Gupta opened this issue · comments

░▒▓ ~  swiggy-analytics  ✔  2.6.3   opstech-integration ⎈ ▓▒░
Welcome to swiggy-analytics.

This command line tool will help you fetch your order history from https://swiggy.com.
You can choose to persist the detailed order information in a SQLite database or
perform lightweight stats operations using in-memory calculations.

Connecting to in memory db
Fetching 999 orders: [ 30.0%] [#############################################################...............................................................................................................................................]
Traceback (most recent call last):
File "/usr/local/bin/swiggy-analytics", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/swiggy_analytics/swiggy_analytics.py", line 80, in main
orders = fetch_and_store_orders(db)
File "/usr/local/lib/python3.7/site-packages/swiggy_analytics/helper.py", line 205, in fetch_and_store_orders
orders = fetch_orders(offset_id)
File "/usr/local/lib/python3.7/site-packages/swiggy_analytics/helper.py", line 88, in fetch_orders
return response.json().get('data').get('orders', [])
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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)