Closed stonetwig closed 8 months ago
NameError: name 'Path' is not defined
Try from pathlib import Path
@Rooyca Thanks, but I already have imported that. The thing is, I call the function htmx_init with different parameters but the default "my_app" is still called for some reason?
@stonetwig Did you try from pathlib import Path
in the library site-packages/fastapi_htmx/htmx.py , this solve my issue.
@stonetwig you are totally correct, the lib was broken with that release. My bad, sorry. Thanks very much for reporting it.
It's fixed now, please reinstall/update the fastapi-htmx
package to at least version 0.4.0
(for pip: pip install fastapi-htmx --upgrade
).
I created #23 to prevent this kind of error from happening again.
Thanks @Rooyca and @omarisw for helping out :)
@maces No worries, thank you for updating it so fast and for the hard work you do as an open source maintainer.
You have a nice package going here and its probably my favorite way of using htmx.
Whenever I try to use your library, as soon as I import fastapi_htmx I get this following error:
I am a bit of a python noob so maybe I am doing something wrong but as soon as I remove the import statement the error goes away. Haven't found a way around it..