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

ValueError: Unknown scheme for proxy URL URL('socks://127.0.0.1:7890/') #9

Open
HakunanMatatat opened this issue Jan 12, 2025 · 3 comments

Comments

@HakunanMatatat
Copy link

➜ litdb /home/vivlio/mnt/anaconda3/envs/myenv/bin/litdb --help
Traceback (most recent call last):
File "/home/vivlio/mnt/anaconda3/envs/myenv/bin/litdb", line 5, in
from litdb.cli import cli
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/litdb/cli.py", line 24, in
import ollama
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/ollama/init.py", line 38, in
_client = Client()
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/ollama/_client.py", line 115, in init
super().init(httpx.Client, host, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/ollama/_client.py", line 95, in init
self._client = client(
~~~~~~^
base_url=_parse_host(host or os.getenv('OLLAMA_HOST')),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<12 lines>...
**kwargs,
^^^^^^^^^
)
^
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/httpx/_client.py", line 693, in init
proxy_map = self._get_proxy_map(proxies or proxy, allow_env_proxies)
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/httpx/_client.py", line 219, in _get_proxy_map
key: None if url is None else Proxy(url=url)
~~~~~^^^^^^^^^
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/httpx/_config.py", line 338, in init
raise ValueError(f"Unknown scheme for proxy URL {url!r}")
ValueError: Unknown scheme for proxy URL URL('socks://127.0.0.1:7890/')

@jkitchin
Copy link
Owner

jkitchin commented Jan 12, 2025

I haven't seen this before. I tried installing litdb in a uv venv with python 3.13, but it was unable to resolve the package requirements.

Are you able to run ollama in a shell, eg

> ollama run llama2

Are you using a VPN? and a current version of ollama and the ollama python library?

@brioglade
Copy link

brioglade commented Jan 15, 2025

ollama run llama2 is normal. Yes, I used a VPN, and the settings are http_proxy and https_proxy. ollama version is 0.5.4. I downloaded ollama manually and used it directly.

(myenv) ➜ ~ litdb --help
Traceback (most recent call last):
File "/home/vivlio/mnt/anaconda3/envs/myenv/bin/litdb", line 5, in
from litdb.cli import cli
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/litdb/init.py", line 1, in
import litdb.lab # noqa: F401
^^^^^^^^^^^^^^^^
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/litdb/lab.py", line 6, in
from .cli import cli
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/litdb/cli.py", line 30, in
from sentence_transformers import SentenceTransformer
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/sentence_transformers/init.py", line 9, in
from sentence_transformers.backend import (
...<3 lines>...
)
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/sentence_transformers/backend.py", line 11, in
from sentence_transformers.util import disable_datasets_caching, is_datasets_available
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/sentence_transformers/util.py", line 17, in
import torch
File "/home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/torch/init.py", line 367, in
from torch._C import * # noqa: F403
^^^^^^^^^^^^^^^^^^^^^^
ImportError: /home/vivlio/mnt/anaconda3/envs/myenv/lib/python3.13/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12

@jkitchin
Copy link
Owner

packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12 means some library is either missing, the wrong version, etc. specifically related to nvidia, and here the libcusparse file. This is probably some kind of incompatibility with your pytorch / nvidia installation.

I don't know what the fix is, maybe it is a library path issue, or you have to reinstall some combination of torch, cuda, etc.

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

3 participants