You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nearly every function raises the following error when using version 0.14.2 and above. Does not happen with version 0.14.1:
>>> kr8s.get("pods")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\__init__.py", line 93, in get
return _run_sync(partial(_get, _asyncio=False))(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_io.py", line 75, in wrapped
return portal.call(wrapped)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_io.py", line 50, in call
return self._portal.call(func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\from_thread.py", line 288, in call
return cast(T_Retval, self.start_task_soon(func, *args).result())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result
raise self._exception
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\from_thread.py", line 217, in _call_func
retval = await retval_or_awaitable
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\asyncio\_helpers.py", line 64, in get
api = await _api(_asyncio=_asyncio)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\asyncio\_api.py", line 76, in api
return await _f(
^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\asyncio\_api.py", line 74, in _f
return await _cls(**kwargs, bypass_factory=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_api.py", line 71, in f
await self.auth
await self.reauthenticate()
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_auth.py", line 64, in reauthenticate
await self._load_kubeconfig()
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_auth.py", line 97, in _load_kubeconfig
self.kubeconfig = await KubeConfigSet(*self._kubeconfig_path.split(":"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_config.py", line 27, in f
await config
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_config.py", line 170, in f
async with await anyio.open_file(self.path) as fh:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\_core\_fileio.py", line 185, in open_file
fp = await to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 2134, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 851, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C'
Anything else?
I am using python 3.11.7 on Windows 11. Running kubectl version I get:
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.1-eks-b9c9ed7
The text was updated successfully, but these errors were encountered:
File "C:\Users\dhorkel\code\python_scratch\.venv\Lib\site-packages\kr8s\_auth.py", line 97, in _load_kubeconfig
self.kubeconfig = await KubeConfigSet(*self._kubeconfig_path.split(":"))
is splitting the windows filepath at the drive name
Thanks for raising this! I think you're right that the bug was introduced when the multi-path support was added.
In kr8s we don't officially support Windows, we could but that's a separate conversation. However this looks like a quick fix so I'll open a PR to disable multiple config support on Windows.
Which project are you reporting a bug for?
kr8s
What happened?
Nearly every function raises the following error when using version 0.14.2 and above. Does not happen with version 0.14.1:
Anything else?
I am using python 3.11.7 on Windows 11. Running
kubectl version
I get:The text was updated successfully, but these errors were encountered: