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

Error while runing #1

Closed
pratik-dani opened this issue Jan 1, 2021 · 4 comments
Closed

Error while runing #1

pratik-dani opened this issue Jan 1, 2021 · 4 comments

Comments

@pratik-dani
Copy link

pratik-dani commented Jan 1, 2021

I was trying to run the sample code in the Readme. I got an error

Traceback (most recent call last):
  File "pdfkitv2.py", line 8, in <module>
    from fastapi_simple_security import api_key_router, api_key_security
  File "D:\enviorments\pdfkit\lib\site-packages\fastapi_simple_security\__init__.py", line 1, in <module>
    from fastapi_simple_security.endpoints import api_key_router
  File "D:\enviorments\pdfkit\lib\site-packages\fastapi_simple_security\endpoints.py", line 7, in <module>
    from fastapi_simple_security._security_secret import secret_based_security
  File "<fstring>", line 1
    (SECRET=)

I think there is an error in the file _security_secret.py Line 18.

@mrtolkien
Copy link
Owner

Which python version or you using?

It seems it might be linked to your python version not being able to use f-strings with =, which were an addition of python 3.8

@pratik-dani
Copy link
Author

Okay. My python version is 3.7. I think this might be the issue.

@pratik-dani
Copy link
Author

Hi I upgraded the python I am now using 3.8.5. But after running I am getting this error now.

sqlite3.OperationalError: unable to open database file

@tordnilsen
Copy link

Hi. I also have same error. My version is 3.9.1, running on wsl2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants