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

config.json not found in uvicorn startup #438

Closed
Nicdelsan opened this issue Mar 31, 2024 · 8 comments
Closed

config.json not found in uvicorn startup #438

Nicdelsan opened this issue Mar 31, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Nicdelsan
Copy link

Describe the bug
When i try to startup the uvicorn server, this error appear:

(OpenDevin-faaYuwYm) C:\Users\Utente\OpenDevin>uvicorn opendevin.server.listen:app --port 3000 Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Scripts\uvicorn.exe\__main__.py", line 7, in <module> File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\main.py", line 409, in main run( File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\main.py", line 575, in run server.run() File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 685, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\server.py", line 69, in serve await self._serve(sockets) File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\server.py", line 76, in _serve config.load() File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\config.py", line 433, in load self.loaded_app = import_from_string(self.app) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\uvicorn\importer.py", line 19, in import_from_string module = importlib.import_module(module_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\importlib\__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1387, in _gcd_import File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 995, in exec_module File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "C:\Users\Utente\OpenDevin\opendevin\server\listen.py", line 4, in <module> import agenthub # noqa F401 (we import this to get the agents registered) ^^^^^^^^^^^^^^^ File "C:\Users\Utente\OpenDevin\agenthub\__init__.py", line 5, in <module> from . import langchains_agent # noqa: E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\OpenDevin\agenthub\langchains_agent\__init__.py", line 2, in <module> from .langchains_agent import LangchainsAgent File "C:\Users\Utente\OpenDevin\agenthub\langchains_agent\langchains_agent.py", line 8, in <module> from agenthub.langchains_agent.utils.memory import LongTermMemory File "C:\Users\Utente\OpenDevin\agenthub\langchains_agent\utils\memory.py", line 37, in <module> embed_model = HuggingFaceEmbedding( ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\llama_index\embeddings\huggingface\base.py", line 86, in __init__ self._model = SentenceTransformer( ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\sentence_transformers\SentenceTransformer.py", line 191, in __init__ modules = self._load_sbert_model( ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Utente\.virtualenvs\OpenDevin-faaYuwYm\Lib\site-packages\sentence_transformers\SentenceTransformer.py", line 1163, in _load_sbert_model with open(config_sentence_transformers_json_path) as fIn: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Utente\\AppData\\Local\\llama_index\\models--BAAI--bge-small-en-v1.5\\snapshots\\5c38ec7c405ec4b44b94cc5a9bb96e735b38267a\\config_sentence_transformers.json'

Steps to Reproduce
1.Start the backend
2.Try to start uvicorn server

Expected behavior
It should read all files with succes

Actual behavior
After this error, when i try to start the frontend, in the web ui, this is the error message:

ERROR: Failed connection to server. Please ensure the server is reachable at ws://localhost:3000/ws.

Additional context

@Nicdelsan Nicdelsan added the bug Something isn't working label Mar 31, 2024
@vdsasi
Copy link

vdsasi commented Mar 31, 2024

Try to run on Linux or Mac OS. If you are on Windows try running on WSL.

It is also mentioned in requirements README.md file to run on WSL if you are using windows.

@rbren
Copy link
Collaborator

rbren commented Mar 31, 2024

@Nicdelsan can you tell us more about your environment/setup?

@BartoszSiemienczuk
Copy link

BartoszSiemienczuk commented Apr 2, 2024

I have the same issue while running make start-backend on MacOS Sonoma on M3 Max. It is looking for the same file in my Library directory and fails.

Edit: Actually not the same.
The missing file is : /Users/<user>/Library/Caches/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json

@jay-c88
Copy link

jay-c88 commented Apr 2, 2024

I have the same issue while running make start-backend on MacOS Sonoma on M3 Max. It is looking for the same file in my Library directory and fails.

Edit: Actually not the same. The missing file is : /Users/<user>/Library/Caches/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json

This helped me get rid of the missing file issue

@wesamdev
Copy link

wesamdev commented Apr 2, 2024

here is a fix #573

@rbren rbren changed the title config_sentence_transformers.json not found in uvicorn startup config.json not found in uvicorn startup Apr 5, 2024
@yufansong
Copy link
Collaborator

Seems problem can be temporally solved. Close it now. Need investigate better solution in the future.

@rbren
Copy link
Collaborator

rbren commented Apr 6, 2024

@yufansong is the solution to run that wget? If new users are hitting this I think we need to fix it

@yufansong
Copy link
Collaborator

yufansong commented Apr 6, 2024

Is the solution to run that wget

Yes, as mentioned in that comments , currently may need use wget as a workaround.

If new users are hitting this I think we need to fix it

Agree with you, but still think what is a good solution we can do in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants