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

database() function seems unsuitable for opening remote postgresql db #58

Open
tristan-white opened this issue Jan 25, 2025 · 0 comments

Comments

@tristan-white
Copy link

from fasthtml.common import  *
from fastsql import *

DB_URL = f"postgres+psycopg2://myuser:[email protected]:5432/mydatabase"
#
db = database(DB_URL)
Traceback (most recent call last):
  File "/home/tristan/maxhilton/main.py", line 33, in <module>
    db = database(DB_URL)
  File "/home/tristan/maxhilton/.venv/lib/python3.10/site-packages/fastlite/kw.py", line 14, in database
    path.parent.mkdir(exist_ok=True)
  File "/usr/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'postgres:/myuser:[email protected]:5432'

Link to line 14 in kw.py

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

1 participant