You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have attempted to install easy auth in an existing fast API project. There are the following 2 issues encountered:
Pip/Poetry add do not install all dependencies. The following dependencies are getting missed and need to be installed
using pip or poetry one by one.
pydbantic
bycrypt
fastapi-mail
gunicorn
eamil-validator
google-api-python-client
Secondly, I am getting the below error on starting the server. Not sure what is causing this problem
`ERROR: Traceback (most recent call last):
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 671, in lifespan
async with self.lifespan_context(app):
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
await self._router.startup()
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 648, in startup
await handler()
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/./blog/main.py", line 26, in startup
app.auth = await EasyAuthServer.create(
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 225, in create
auth_server = cls(
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 107, in init
self.load_env_from_file(env_from_file)
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 362, in load_env_from_file
env_file = json.load(json_env)
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/init.py", line 293, in load
return loads(fp.read(),
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
1.) I would make sure that PIP is up to date on your machine, poetry is less tested right now. I expect to clean up a bit of the dependencies with future bumps of DB layer.
It looks like env_from_file was specified when creating the server, but the file was not found. A good candidate for a future improvement / error handling. Thanks for reporting.
I have attempted to install easy auth in an existing fast API project. There are the following 2 issues encountered:
using pip or poetry one by one.
`ERROR: Traceback (most recent call last):
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 671, in lifespan
async with self.lifespan_context(app):
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
await self._router.startup()
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/starlette/routing.py", line 648, in startup
await handler()
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/./blog/main.py", line 26, in startup
app.auth = await EasyAuthServer.create(
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 225, in create
auth_server = cls(
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 107, in init
self.load_env_from_file(env_from_file)
File "/Users/ahmad/Library/CloudStorage/OneDrive-Personal/Coding/FastApi/blog-app/.venv/lib/python3.10/site-packages/easyauth/server.py", line 362, in load_env_from_file
env_file = json.load(json_env)
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/init.py", line 293, in load
return loads(fp.read(),
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/ahmad/.pyenv/versions/3.10.9/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR: Application startup failed. Exiting.`
Envoirnemnt specification
python: 3.10.9
OS: MacOS
The text was updated successfully, but these errors were encountered: