LucaFalasca / Bus4You

1 stars 0 forks source link

Error when trying to do user registration #69

Closed LucaFalasca closed 1 year ago

LucaFalasca commented 1 year ago

Failure:

In pratica quando provo a fare la registrazione sulla pagina /signUp mi da questo errore

Traceback:

requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last)

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\requests\models.py", line 971, in json

return complexjson.loads(self.text, **kwargs)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads

return _default_decoder.decode(s)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode

raise JSONDecodeError("Expecting value", s, err.value) from None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

During handling of the above exception, another exception occurred:
File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 2213, in __call__

return self.wsgi_app(environ, start_response)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 2193, in wsgi_app

response = self.handle_exception(e)
           ^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 2190, in wsgi_app

response = self.full_dispatch_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 1486, in full_dispatch_request

rv = self.handle_user_exception(e)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 1484, in full_dispatch_request

rv = self.dispatch_request()
     ^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\Lib\site-packages\flask\app.py", line 1469, in dispatch_request

return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\frontend\login\main.py", line 65, in signUp

response = requests.get(gateway_sign_up_url).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\LucaF\OneDrive - Universita' degli Studi di Roma Tor Vergata\Luca\SDCC\Bus4You\venv\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)

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
LucaFalasca commented 1 year ago

Succede anche con il login

LucaFalasca commented 1 year ago

@matteo-conti-97 Ho provato ad eliminare il volume ma da lo stesso problema

matteo-conti-97 commented 1 year ago

Era necessario eliminare container, immagini e volumi e rifare la build con docker compose