JetJadeja / Tanzine

A Programming Language Interpreted in Python.
MIT License
6 stars 0 forks source link

Python Error Not Covered By Parser: (json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)) #30

Open Tater-Bot opened 4 years ago

Tater-Bot commented 4 years ago

A Python error occurred when running this Tanzine: https://discordapp.com/channels/731302554784235520/732672699297562814/752296800609632286

Tanzine Code:

@FUNC@ <fetchJSON> [@url] {
  @VAR@ request = @RUN@ (requests/get,@url)
  @VAR@ json = @RUN@ (@request.json)
  @RETURN@ @json
}

@VAR@ response = @RUN@ (<fetchJSON>,"http://crows.sh/cosmosis/getChain")

@RUN@ (/print,@response)

Python Error:

Traceback (most recent call last):
  File "run.py", line 10, in <module>
    parser.Parse()
  File "/root/tanzine-bot/tokens.py", line 362, in Parse
    self.run_functions(func, args)
  File "/root/tanzine-bot/tokens.py", line 457, in run_functions
    self.Parse()
  File "/root/tanzine-bot/tokens.py", line 421, in Parse
    x = exec(statment)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)