Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: JWT token library import error when not included in requirements #56

Open
joostsijm opened this issue Jan 31, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@joostsijm
Copy link
Contributor

Contact Details

No response

Complexity

easy

Priority

low prio

What happened?

No response

How to Reproduce?

Open calculater.
Press 1,
Press +,
Press 1,
Press =

What did you expect and what was the actual result?

I expected 2 but the calculator returned 3

Add screenshots, video's etc

No response

Relevant log output

> docker compose up                                    
[+] Running 1/1
 ✔ Container rana_old-backend-1  Recreated                                                                                                           0.3s 
Attaching to backend-1
backend-1  | INFO:     Will watch for changes in these directories: ['/code']
backend-1  | INFO:     Uvicorn running on http://0:8000 (Press CTRL+C to quit)
backend-1  | INFO:     Started reloader process [1] using StatReload
backend-1  | Process SpawnProcess-1:
backend-1  | Traceback (most recent call last):
backend-1  |   File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
backend-1  |     self.run()
backend-1  |   File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
backend-1  |     self._target(*self._args, **self._kwargs)
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 78, in subprocess_started
backend-1  |     target(sockets=sockets)
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 62, in run
backend-1  |     return asyncio.run(self.serve(sockets=sockets))
backend-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
backend-1  |     return runner.run(main)
backend-1  |            ^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
backend-1  |     return self._loop.run_until_complete(task)
backend-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
backend-1  |     return future.result()
backend-1  |            ^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
backend-1  |     config.load()
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 458, in load
backend-1  |     self.loaded_app = import_from_string(self.app)
backend-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 24, in import_from_string
backend-1  |     raise exc from None
backend-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
backend-1  |     module = importlib.import_module(module_str)
backend-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
backend-1  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
backend-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
backend-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
backend-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
backend-1  |   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
backend-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-1  |   File "/code/src/backend_service/main.py", line 5, in <module>
backend-1  |     from clean_python.fastapi import Service
backend-1  |   File "/usr/local/lib/python3.11/site-packages/clean_python/fastapi/__init__.py", line 4, in <module>
backend-1  |     from .resource import *  # NOQA
backend-1  |     ^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/site-packages/clean_python/fastapi/resource.py", line 18, in <module>
backend-1  |     from .security import RequiresScope
backend-1  |   File "/usr/local/lib/python3.11/site-packages/clean_python/fastapi/security.py", line 9, in <module>
backend-1  |     from clean_python.oauth2 import BaseTokenVerifier
backend-1  |   File "/usr/local/lib/python3.11/site-packages/clean_python/oauth2/__init__.py", line 2, in <module>
backend-1  |     from .token_verifier import *  # NOQA
backend-1  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-1  |   File "/usr/local/lib/python3.11/site-packages/clean_python/oauth2/token_verifier.py", line 11, in <module>
backend-1  |     import jwt
backend-1  | ModuleNotFoundError: No module named 'jwt'

Additional info

No response

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

No branches or pull requests

2 participants