When setting the `MELTANO_DATABASE_URI` env var to...
# troubleshooting
c
When setting the
MELTANO_DATABASE_URI
env var to be a postgres db (such
<postgresql+psycopg://user:password@localhost:5432/meltano>
) and running
meltano state list
I get the following error
No module named 'psycopg'
I have tried • Adding the postgres utility to meltano -
meltano add utility postgres
• Adding python packages
postgres
,
psycopg2
,
psycopg2-binary
• Re-reading over and over the docs here and here to no avail I am at a dead end 😞 Help?
1
b
I would try changing your URL to start with
postgresql+psycopg2://
.
e
@Chase Brammer how did you install meltano? You might need to install it as
meltano[postgres]
and we could probably make it more explicit in that doc.
c
@Edgar Ramírez (Arch.dev) install with uv @BuzzCutNorman changed, no joy 😞
Side note, in testing the tap-github plugin I targeted the MeltanoLabs org to sync.. and @Edgar Ramírez (Arch.dev) has a crazy amount of commits/activity
e
> install with uv Ok, so if you did
uv tool install meltano
you might wanna do
uv tool install --from meltano[postgres] meltano
crazy amount of commits/activity
🙈
c
🤔 Will try to debug more, but •
uv tool install --from meltano\[postgres\] meltano
(needed to add the \ to install • Same error while running both
uvx meltano state list
and
uv tool run meltano state list
TL;DR: that didn't work 😞 I thought it was maybe a lingering version of meltano being called by uvx. Purged my entire system of all meltano items, and installed again with [postgres] and verified the tool installed by looking at the
~/.local/share/uv/tools/meltano/uv-receipt.toml
file which has the postgres flag on
Copy code
[tool]
requirements = [{ name = "meltano", extras = ["postgres"] }]
entrypoints = [
    { name = "meltano", install-path = "/Users/myuser/.local/bin/meltano" },
]
e
where meltano
might reveal something
c
Hold the phone! Just changed back from the suggestion above on the URI
postgresql+psycopg2
to
postgresql+psycopg
and we are back in business!
I would have never figured out to install with
[postgres]
e
c
e
Thanks!