sukeesh / Jarvis

Personal Assistant for Linux and macOS
MIT License
3.02k stars 1.04k forks source link

Cryptotracker not working #1117

Open palash018 opened 1 year ago

palash018 commented 1 year ago

i ran simple "cryptotracker" command and was greeted with an error.I think its because cryptonator api is not working. I suggest it should be replaced with some other api which is working here is the stack trace

Some error occurred, please open an issue on github!
Here is error:

Traceback (most recent call last):
  File "C:\opensource\Jarvis\env\lib\site-packages\requests\models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\opensource\Jarvis\env\lib\site-packages\simplejson\__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "C:\opensource\Jarvis\env\lib\site-packages\simplejson\decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "C:\opensource\Jarvis\env\lib\site-packages\simplejson\decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\opensource\Jarvis\jarviscli\CmdInterpreter.py", line 286, in try_do
    do(self, s)
  File "C:\opensource\Jarvis\jarviscli\plugin.py", line 208, in run
    self._backend[0](jarvis.get_api(), s)
  File "C:\opensource\Jarvis\jarviscli\plugins\cryptotracker.py", line 100, in main
    check_prices(base, target)
  File "C:\opensource\Jarvis\jarviscli\plugins\cryptotracker.py", line 51, in check_prices
    response = requests.get(url).json()
  File "C:\opensource\Jarvis\env\lib\site-packages\requests\models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
niljub commented 1 year ago

Working on a fix :)

niljub commented 1 year ago

I'm pleased to report that the fix for this issue has been successfully implemented in pull request #1134. The issue with the cryptotracker has been resolved by switching to the Binance API, which was the most suitable choice due to certain limitations posed by other APIs.