GithubHelp home page GithubHelp logo

Comments (3)

tulir avatar tulir commented on June 22, 2024

Usually postgres:///mautrix_googlechat is enough. If you absolutely need a custom username, it might work with a ?user query parameter.

from googlechat.

arcnmx avatar arcnmx commented on June 22, 2024

Fair, the username is only really there for consistency. The assumption by the error message seems false though? I didn't even try postgres:///x because the error message implies that it too would be invalid (given that it's absolute without a host). Maybe that also makes it a yarl issue, afaik a missing host can still be valid even with authority.

from googlechat.

Sodykhorn avatar Sodykhorn commented on June 22, 2024

Attempting to use a config like:

appservice:

  database: postgres://mautrix-googlechat@/mautrix_googlechat

Now results in the following failure:


mautrix-googlechat[685955]:   File "/lib/python3.9/site-packages/mautrix/bridge/bridge.py", line 168, in prepare_db

mautrix-googlechat[685955]:     self.db = Database.create(

mautrix-googlechat[685955]:   File "/lib/python3.9/site-packages/mautrix/util/async_db/database.py", line 66, in create

mautrix-googlechat[685955]:     url = URL(url)

mautrix-googlechat[685955]:   File "/lib/python3.9/site-packages/yarl/_url.py", line 167, in __new__

mautrix-googlechat[685955]:     raise ValueError("Invalid URL: host is required for absolute urls")

Previously (on bafd1f7 with mautrix-python 0.14) this worked as expected. As far as I know, using an empty host is the only/standard way to indicate connection via local unix socket path rather than connecting over tcp, so I'm not sure what alternatives are meant to be used here?

This can be worked around by finding the actual socket path, and uri-encoding it into the host like postgres://mautrix-googlechat@%2Frun%2Fpostgresql/mautrix_googlechat

(this may actually be a mautrix-python issue, I'm not sure, should it be moved?)

I'm so sorry

from googlechat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.