diff --git a/project1/bookstore/app.log b/project1/bookstore/app.log deleted file mode 100644 index f795767..0000000 --- a/project1/bookstore/app.log +++ /dev/null @@ -1,1646 +0,0 @@ -INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. - * Running on http://127.0.0.1:5000 -INFO:werkzeug:Press CTRL+C to quit -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:09] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /shutdown [GET] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\serve.py", line 23, in be_shutdown - shutdown_server() - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\serve.py", line 17, in shutdown_server - raise RuntimeError("Not running with the Werkzeug Server") -RuntimeError: Not running with the Werkzeug Server -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:52:10] "GET /shutdown HTTP/1.1" 500 - -INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. - * Running on http://127.0.0.1:5000 -INFO:werkzeug:Press CTRL+C to quit -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:24] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /auth/register [POST] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\view\auth.py", line 35, in register - code, message = u.register(user_id=user_id, password=password) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 59, in register - token = jwt_encode(user_id, terminal) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\model\user.py", line 22, in jwt_encode - return encoded.decode("utf-8") - ^^^^^^^^^^^^^^ -AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "POST /auth/register HTTP/1.1" 500 - -ERROR:be.serve:Exception on /shutdown [GET] -Traceback (most recent call last): - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\venv\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\serve.py", line 23, in be_shutdown - shutdown_server() - File "C:\Users\22924\CDMS.Xuan_ZHOU.2024Fall.DaSE\project1\bookstore\be\serve.py", line 17, in shutdown_server - raise RuntimeError("Not running with the Werkzeug Server") -RuntimeError: Not running with the Werkzeug Server -INFO:werkzeug:127.0.0.1 - - [10/Oct/2024 10:58:25] "GET /shutdown HTTP/1.1" 500 -