Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errore in chiamata rc.get_orari_prenotati() #6

Open
GMFranceschini opened this issue Nov 29, 2022 · 0 comments
Open

Errore in chiamata rc.get_orari_prenotati() #6

GMFranceschini opened this issue Nov 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@GMFranceschini
Copy link

🐛 Bug Report

Ciao, grazie per questa API!
Sto provando ad usarla con l'esempio della prenotazione singolo giorno.
Ottengo questo errore quando utilizzo rc.get_orari_prenotati, sembra che il JSON sia assente o non formattato.
Il login sembra essere effettuato correttamente (True).
Forse sto sbagliando qualcosa, non sono pratico di API.
E' stata testata di recente?

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. Eseguo esempio di prenotazione singolo giorno, inserendo email e password.

Errore ottenuto

Traceback (most recent call last):
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pyristocloud/pyRc.py", line 133, in get_orari_prenotati
    return res.json()["reservations"]
  File "/home/gianma/.pyenv/versions/3.10.4/lib/python3.10/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)

Environment

  • OS: [e.g. Linux / Windows / macOS]
  • Python version, get it with:
python --version

Python 3.10.4

@GMFranceschini GMFranceschini added the bug Something isn't working label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant