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

unix socket can't connect to .sock file in the current directory by relatice path #123

Open
amirreza8002 opened this issue Nov 15, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@amirreza8002
Copy link
Contributor

valkey-server --save "" --unixsocket ./valkey.sock --unixsocketperm 777

from valkey import Valkey

v = Valkey.from_url("unix://valkey.sock")

# or
v = Valkey.from_url("unix://./valkey.sock")

v.set("foo", "var")

valkey.exceptions.ConnectionError: Error 2 connecting to /valkey.sock. No such file or directory.

the only way it seems to work is by giving an absolute path "/home/user/project/..."

@aiven-sal
Copy link
Member

Did you try "unix:./valkey.sock" ? It should work according to RC 1808.
Maybe it can be documented better.

@aiven-sal aiven-sal added the documentation Improvements or additions to documentation label Nov 18, 2024
@aiven-sal aiven-sal self-assigned this Nov 18, 2024
@amirreza8002
Copy link
Contributor Author

hi again
v = Valkey.from_url("unix:./valkey.sock")

thorws this error:

ValueError: Valkey URL must specify one of the following schemes ['valkey', 'valkeys', 'redis', 'rediss', 'unix']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants