Skip to content

start server failed Invalid URL '/api/v1/kv/namespaces': No scheme supplied #91

Open
@renoyuan

Description

my code
image


my env
Python 3.11.5
Package Version

annotated-types 0.7.0
anyio 4.4.0
certifi 2023.7.22
charset-normalizer 3.3.1
click 8.1.7
cloudpickle 3.0.0
colorama 0.4.6
contextlib2 21.6.0
distro 1.9.0
dnspython 2.6.1
docutils 0.20.1
email_validator 2.2.0
exceptiongroup 1.2.2
fastapi 0.111.1
fastapi-cli 0.0.4
filelock 3.15.4
fsspec 2024.6.1
h11 0.14.0
h2 4.1.0
hpack 4.0.0
httpcore 1.0.5
httptools 0.6.1
httpx 0.27.0
huggingface-hub 0.23.4
hyperframe 6.0.1
idna 3.4
importlib-metadata 6.8.0
jaraco.classes 3.3.0
Jinja2 3.1.4
keyring 24.2.0
leptonai 0.21.1
loguru 0.7.2
markdown-it-py 3.0.0
MarkupSafe 2.1.5
mdurl 0.1.2
more-itertools 10.1.0
nh3 0.2.14
openai 1.35.13
packaging 24.1
pillow 10.4.0
pip 24.0
pkginfo 1.9.6
prometheus_client 0.20.0
prometheus-fastapi-instrumentator 7.0.0
pydantic 2.8.2
pydantic_core 2.20.1
Pygments 2.16.1
python-dotenv 1.0.1
python-multipart 0.0.9
pywin32-ctypes 0.2.2
PyYAML 6.0.1
readme-renderer 42.0
requests 2.31.0
requests-toolbelt 1.0.0
rfc3986 2.0.0
rich 13.6.0
setuptools 69.5.1
shellingham 1.5.4
sniffio 1.3.1
starlette 0.37.2
tqdm 4.66.4
twine 5.1.1
typer 0.12.3
typing_extensions 4.12.2
urllib3 2.0.7
uvicorn 0.30.1
watchfiles 0.22.0
websockets 12.0
wheel 0.43.0
win32-setctime 1.1.0
zipp 3.17.0


error information

File "F:\search_with_lepton\search_with_lepton.py", line 428, in init
self.kv = KV(
^^^
File "C:\Users\renoy\anaconda3\envs\ai_search\Lib\site-packages\leptonai\kv.py", line 117, in init
kvs = self._api_client.kv.list_namespaces()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\renoy\anaconda3\envs\ai_search\Lib\site-packages\leptonai\api\v1\kv.py", line 17, in list_namespaces
response = self._get("/kv/namespaces")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\renoy\anaconda3\envs\ai_search\Lib\site-packages\leptonai\api\v1\client.py", line 155, in _get
return self._session.get(self.url + path, *args, **self._safe_add(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\renoy\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\renoy\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\renoy\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 486, in prepare_request
p.prepare(
File "C:\Users\renoy\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 368, in prepare
self.prepare_url(url, params)
File "C:\Users\renoy\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '/api/v1/kv/namespaces': No scheme supplied. Perhaps you meant https:///api/v1/kv/namespaces?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions