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
The error is related to the --reload-exclude option in the uvicorn command. The issue is that the glob pattern you're passing to this option is being interpreted as an absolute path, which is not supported by Python's pathlib.glob() function.
Below is how I solved the issue but not sure if this is an ideal way of handling it ;
First, let's modify the Makefile command. Instead of using $(shell pwd), we'll use a relative path:
This change makes the --reload-exclude pattern relative, which should resolve the NotImplementedError.
OpenHands Installation
Docker command in README
OpenHands Version
main
Operating System
Linux
Logs, Errors, Screenshots, and Additional Context
(oh) ➜ OpenHands git:(main) ✗ make start-backend
Starting backend...
Traceback (most recent call last):
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/bin/uvicorn", line 8, in
sys.exit(main())
^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 412, in main
run(
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 516, in run
config = Config(
^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 292, in init
self.reload_excludes, self.reload_dirs_excludes = resolve_reload_patterns(reload_excludes, [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 145, in resolve_reload_patterns
for match in current_working_directory.glob(pattern):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/anaconda3/envs/oh/lib/python3.12/pathlib.py", line 1090, in glob
raise NotImplementedError("Non-relative patterns are unsupported")
NotImplementedError: Non-relative patterns are unsupported
make: *** [Makefile:193: start-backend] Error 1
The text was updated successfully, but these errors were encountered:
Is there an existing issue for the same bug?
Describe the bug and reproduction steps
just need to run make start-backend
The error is related to the
--reload-exclude
option in theuvicorn
command. The issue is that the glob pattern you're passing to this option is being interpreted as an absolute path, which is not supported by Python'spathlib.glob()
function.Below is how I solved the issue but not sure if this is an ideal way of handling it ;
$(shell pwd)
, we'll use a relative path:This change makes the
--reload-exclude
pattern relative, which should resolve theNotImplementedError
.OpenHands Installation
Docker command in README
OpenHands Version
main
Operating System
Linux
Logs, Errors, Screenshots, and Additional Context
(oh) ➜ OpenHands git:(main) ✗ make start-backend
Starting backend...
Traceback (most recent call last):
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/bin/uvicorn", line 8, in
sys.exit(main())
^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 412, in main
run(
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 516, in run
config = Config(
^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 292, in init
self.reload_excludes, self.reload_dirs_excludes = resolve_reload_patterns(reload_excludes, [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/.cache/pypoetry/virtualenvs/openhands-ai-CvwGNP_0-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 145, in resolve_reload_patterns
for match in current_working_directory.glob(pattern):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anil/anaconda3/envs/oh/lib/python3.12/pathlib.py", line 1090, in glob
raise NotImplementedError("Non-relative patterns are unsupported")
NotImplementedError: Non-relative patterns are unsupported
make: *** [Makefile:193: start-backend] Error 1
The text was updated successfully, but these errors were encountered: