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
In ch4, when I try to run your main.py, I get this:
C:/Users/user/FS-FAPI/source/web-applications-with-fastapi-course/code/ch4-templates/main.py
Traceback (most recent call last):
File "C:\Users\user\FS-FAPI\source\web-applications-with-fastapi-course\code\ch4-templates\main.py", line 7, in <module>
from views import home
File "C:\Users\user\FS-FAPI\source\web-applications-with-fastapi-course\code\ch4-templates\views\home.py", line 9, in <module>
def index():
File "C:\Users\user\FS-FAPI\venv\lib\site-packages\fastapi_chameleon\engine.py", line 72, in response_inner
if not os.path.exists(os.path.join(template_path, template_file)):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Process finished with exit code 1
Looks a timing issue between calling global init and "using" the decorator.
The text was updated successfully, but these errors were encountered:
For now, I can fix this if we default template_folder = "templates" but there should be a better long term fix for guessing template names including the folder customized in global_init(). I'm open to ideas. :)
For now, I can fix this if we default template_folder = "templates" but there should be a better long term fix for guessing template names including the folder customized in global_init(). I'm open to ideas. :)
From a student:
In ch4, when I try to run your main.py, I get this:
Looks a timing issue between calling global init and "using" the decorator.
The text was updated successfully, but these errors were encountered: