MatKollar / Invoice_OCR_app

Web application for recognizing and managing data from Slovak invoices.
MIT License
34 stars 5 forks source link

Error on login #11

Closed davidtgbe closed 1 year ago

davidtgbe commented 1 year ago

Just installed all the stuff on a fresh up to date Hyper-V machine with Ubuntu 22.04 following the instructions. I've experienced the same result using WSL. When I try to login with admin/admin I get:

backend_1 | [2023-09-08 12:14:09,072] [ INFO] _internal.py:187 - 172.18.0.1 - - [08/Sep/2023 12:14:09] "OPTIONS /login HTTP/1.1" 500 - backend_1 | Traceback (most recent call last): backend_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2213, in call backend_1 | return self.wsgi_app(environ, start_response) backend_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2193, in wsgi_app backend_1 | response = self.handle_exception(e) backend_1 | File "/usr/local/lib/python3.10/site-packages/flask_cors/extension.py", line 165, in wrapped_function backend_1 | return cors_after_request(app.make_response(f(*args, **kwargs))) backend_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2189, in wsgi_app backend_1 | ctx.push() backend_1 | File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 377, in push backend_1 | self.session = session_interface.open_session(self.app, self.request) backend_1 | File "/usr/local/lib/python3.10/site-packages/flask_session/sessions.py", line 517, in open_session backend_1 | sid = request.cookies.get(app.session_cookie_name) backend_1 | AttributeError: 'Flask' object has no attribute 'session_cookie_name'

MatKollar commented 1 year ago

Hello @davidtgbe, thank you for reporting the issue.

The 'session_cookie_name' was deprecated in a newer version of Flask 2.3.

I have changed the version of flask-session from 0.4.0 to 0.5.0. I pushed the changes to the main branch it should work now.

Please pull the newer version and rebuild image using docker compose build backend command.

If something doesn't work for you, please let me know.