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

make run doesn't work as expected #561

Closed
Hicortab opened this issue Apr 2, 2024 · 29 comments
Closed

make run doesn't work as expected #561

Hicortab opened this issue Apr 2, 2024 · 29 comments
Labels
bug Something isn't working installation problems with installation and setup

Comments

@Hicortab
Copy link

Hicortab commented Apr 2, 2024

Describe the bug

When I use the make run command the server seems to start correctly but when I try to go to http://localhost:3001 it says that it is not possible to connect to my ws://localhost:3001/ws giving me a whole series of errors regarding ws

Setup and configuration

I have correctly performed all the installation steps therefore: install node, python, docker and performed the steps such as make build successfully.

As the LLM API key I used the OpenAI one for the rest this is the model of my laptop: Hp pavilion 15-cb017nl. The only change that has been made is to have installed an SSD and another 8GB of RAM

Schermata del 2024-04-02 12-06-39
immagine

@Hicortab Hicortab added the bug Something isn't working label Apr 2, 2024
@proclama2022
Copy link

Same Issue here

@Redrum624
Copy link
Contributor

Redrum624 commented Apr 2, 2024

Same here. I can't "make start-backend" either because "import charset_normalizer as chardet, ModuleNotFoundError: No module named 'charset_normalizer'"

@enyst
Copy link
Collaborator

enyst commented Apr 2, 2024

Same here. I can't "make start-backend" either because "import charset_normalizer as chardet, ModuleNotFoundError: No module named 'charset_normalizer'"

@Redrum624 Your issue seems different. It sounds like this #469

Please can you try from these steps, the section "If pipenv doesn't work for you, you can also run" when you're in the opendevin directory:

python -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt

@jlvallelonga
Copy link

make run didn't work for me (same error), but running make start-backend and separately running make start-frontend did

@enyst
Copy link
Collaborator

enyst commented Apr 2, 2024

@Hicortab there was a very recent fix for a connection issue, can you make sure your git repo is newly updated? Although that error looks like it already is updated, I'm not sure.

@HosseyNJF
Copy link

HosseyNJF commented Apr 2, 2024

It may be related to the fact that the backend server takes too long to load and download dependencies, and the log output is suppressed so the user isn't informed about it.

@rbren rbren added the installation problems with installation and setup label Apr 2, 2024
@dheerajbhadani
Copy link

It seems there are few more packages required to be installed.
pip install chardet openai llama-index-llms-openai llama-index-vector-stores-postgres llama-index-vector-stores-chroma llama-index-embeddings-huggingface

Details of the error messages and respective packages are as mentioned below:
Error -1:
ModuleNotFoundError: No module named 'charset_normalizer'
Fix:
pip install chardet

Error -2:
ModuleNotFoundError: No module named 'openai'
Fix:
pip install openai

Error-3:
ModuleNotFoundError: No module named 'llama_index'
Fix:
pip install llama-index-llms-openai

Error-4:
ModuleNotFoundError: No module named 'llama_index.vector_stores'
Fix:
pip install llama-index-vector-stores-postgres

Error-5:
ModuleNotFoundError: No module named 'llama_index.vector_stores.chroma'
Fix:
pip install llama-index-vector-stores-chroma

Error-6:
ModuleNotFoundError: No module named 'llama_index.embeddings.huggingface'
Fix:
pip install llama-index-embeddings-huggingface

After installing above packages, llama_index is looking for a 1_Pooling/config.json in tmp location and that is missing. If anyone has any thoughts on this, please share.

Thank you

@jay-c88
Copy link

jay-c88 commented Apr 2, 2024

After installing above packages, llama_index is looking for a 1_Pooling/config.json in tmp location and that is missing. If anyone has any thoughts on this, please share.

When I start a fresh environment with the newest opendevin commit, I also get that error after running. after just running make build to install requirements.

Full error log:

jay@JPC:~/OpenDevin$ make start-backend
Starting backend...
Traceback (most recent call last):
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/bin/uvicorn", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main
    run(
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run
    server.run()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
    await self._serve(sockets)
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
    config.load()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/jay/OpenDevin/opendevin/server/listen.py", line 4, in <module>
    import agenthub # noqa F401 (we import this to get the agents registered)
    ^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/__init__.py", line 5, in <module>
    from . import monologue_agent # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/monologue_agent/__init__.py", line 2, in <module>
    from .agent import MonologueAgent
  File "/home/jay/OpenDevin/agenthub/monologue_agent/agent.py", line 28, in <module>
    from agenthub.monologue_agent.utils.memory import LongTermMemory
  File "/home/jay/OpenDevin/agenthub/monologue_agent/utils/memory.py", line 37, in <module>
    embed_model = HuggingFaceEmbedding(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/llama_index/embeddings/huggingface/base.py", line 86, in __init__
    self._model = SentenceTransformer(
                  ^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 191, in __init__
    modules = self._load_sbert_model(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 1246, in _load_sbert_model
    module = module_class.load(module_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/models/Pooling.py", line 227, in load
    with open(os.path.join(input_path, "config.json")) as fIn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json'
make: *** [Makefile:24: start-backend] Error 1
jay@JPC:~/OpenDevin$ docker -v
Docker version 25.0.3, build 4debf41
jay@JPC:~/OpenDevin$ node -v
v21.7.1
jay@JPC:~/OpenDevin$ python -V
Python 3.11.7

@dheerajbhadani
Copy link

@jay-c88, ditto error message.
Do you see any container running after build?
docker ps

@jay-c88
Copy link

jay-c88 commented Apr 2, 2024

Nope, I don't even have time to check before uvicorn exits with the error.
After make build only, there shouldn't be any docker running anyway. Only after starting uvicorn sucessfully and loading the frontend, the docker containter should run IIRC.

@apurvns
Copy link

apurvns commented Apr 2, 2024

After installing above packages, llama_index is looking for a 1_Pooling/config.json in tmp location and that is missing. If anyone has any thoughts on this, please share.

When I start a fresh environment with the newest opendevin commit, I also get that error after running. after just running make build to install requirements.

Full error log:

jay@JPC:~/OpenDevin$ make start-backend
Starting backend...
Traceback (most recent call last):
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/bin/uvicorn", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main
    run(
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run
    server.run()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
    await self._serve(sockets)
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
    config.load()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/jay/OpenDevin/opendevin/server/listen.py", line 4, in <module>
    import agenthub # noqa F401 (we import this to get the agents registered)
    ^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/__init__.py", line 5, in <module>
    from . import monologue_agent # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/monologue_agent/__init__.py", line 2, in <module>
    from .agent import MonologueAgent
  File "/home/jay/OpenDevin/agenthub/monologue_agent/agent.py", line 28, in <module>
    from agenthub.monologue_agent.utils.memory import LongTermMemory
  File "/home/jay/OpenDevin/agenthub/monologue_agent/utils/memory.py", line 37, in <module>
    embed_model = HuggingFaceEmbedding(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/llama_index/embeddings/huggingface/base.py", line 86, in __init__
    self._model = SentenceTransformer(
                  ^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 191, in __init__
    modules = self._load_sbert_model(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 1246, in _load_sbert_model
    module = module_class.load(module_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/models/Pooling.py", line 227, in load
    with open(os.path.join(input_path, "config.json")) as fIn:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json'
make: *** [Makefile:24: start-backend] Error 1
jay@JPC:~/OpenDevin$ docker -v
Docker version 25.0.3, build 4debf41
jay@JPC:~/OpenDevin$ node -v
v21.7.1
jay@JPC:~/OpenDevin$ python -V
Python 3.11.7

same error here.. also no container running @dheerajbhadani after command make run ..

@dheerajbhadani
Copy link

I managed to fix the problem by manually adding the missing json file from https://huggingface.co/BAAI/bge-small-en-v1.5/blob/main/1_Pooling/config.json

I hope this works for you as well.

@Hicortab
Copy link
Author

Hicortab commented Apr 2, 2024

I reinstalled the repository as one user suggested and reinstalled everything via a virtual environment but now my problem has moved to vueJS.

user@userPCs:~/Desktop/OpenDevin$ run
Running the app...

opendevin-frontend@0.1.0 start
vite --port 3001

unable to load configuration from /home/user/Scrivania/OpenDevin/frontend/vite.config.ts
error when starting the development server:
Error [ERR_MODULE_NOT_FOUND]: Unable to find package 'vite-tsconfig-paths' imported from /home/user/Scrivania/OpenDevin/frontend/vite.config.ts.timestamp-1712058938213-02fc52dc1e29a.mjs
to new NodeError (node:internal/errors:400:5)
in packageResolve (node:internal/modules/esm/resolve:889:9)
on moduleResolve (node:internal/modules/esm/resolve:938:20)
in defaultResolve (node:internal/modules/esm/resolve:1153:11)
to nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:842:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
in ModuleWrap. (node:internal/modules/esm/module_job:77:40)
at the link (node:internal/modules/esm/module_job:76:36)
make: *** [Makefile:36: run] Error 1

@Hicortab Hicortab closed this as completed Apr 2, 2024
@Hicortab Hicortab reopened this Apr 2, 2024
@Hicortab
Copy link
Author

Hicortab commented Apr 2, 2024

My initial error with VueJS was that I didn't have it (which is actually false because until I opened the issue it worked perfectly), I tried to execute a whole series of commands to try to solve the problem independently but I think of having made things worse.

All commands I've ran:

05 cd Scrivania/OpenDevin/
106 python -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt
107 sudo su
108 python
109 python3
110 clear
111 sudo us
112 sudo python3 -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt
113 sudo python3 -m pipenv requirements > requirements.txt && sudo python3 -m pip install -r requirements.txt
114 ls -l
115 pip3 install -r requirements.txt
116 sudo pip3 install -r requirements.txt
117 sudo su
118 cd Scrivania/
119 rm -rf OpenDevin/*
120 sudo rm -rf OpenDevin/*
121 ~
122 sudo rm -rf OpenDevin/
123 clear
124 git clone https://github.com/OpenDevin/OpenDevin.git
125 cd OpenDevin/
126 make build
127 sudo make build
128 make build
129 cd ..
130 rm -rf OpenDevin/
131 git clone https://github.com/OpenDevin/OpenDevin.git
132 cd OpenDevin/
133 ls
134 ls -l
135 make build
136 python3 -m pipenv requirements > requirements.txt && python3 -m pip install -r requirements.txt
137 history | grep env
138 python3 -m pipenv requirements > requirements.txt
139 python3 -m pip install -r requirements.txt
140 python3 -m pip3 install -r requirements.txt
141 pip
142 pip3
143 clear
144 python3 -m pip install -r requirements.txt
145 pip3 install externally-managed-environment
146 sudo pip3 install externally-managed-environment
147 sudo python3 -m pip install -r requirements.txt
148 python3 -m venv .venv
149 sudo python3 -m pip install -r requirements.txt
150 nano requirements.txt
151 python3 -m venv .venv
152 source .venv/bin/activate
153 python3 -m pip install -r requirements.txt
154 clear
155 make setup-config
156 make run
157 node
158 clear
159 npm i
160 npm
161 clear
162 npm install
163 ls
164 cd ~
165 ls
166 clear
167 make run
168 cd Scrivania/
169 ls
170 cd OpenDevin/
171 ls
172 make run
173 npm run dev
174 sudo make run
175 clear
176 history
177 npm install -g @vue/cli
178 sudo npm install -g @vue/cli
179 clear
180 make run
181 cd Scrivania/
182 cd OpenDevin/
183 ls
184 make run
185 vite
186 sudo apt install vite
187 clear
188 make run
189 sudo apt remove vite
190 make run
191 npm
192 vite --v
193 vue --version
194 nano Makefile
195 make start-backend
196 make start-frontend
197 npm run build
198 npm ls vite
199 npm install vite
200 make run
201 vite
202 cd Scrivania/
203 cd OpenDevin/
204 make run
205 npm i -S @vitejs/plugin-react
206 make run
207 l
208 clear
209 ls
210 nano package
211 nano package.json
212 cd frontend/
213 ls
214 make run
215 cd ..
216 make run

@jay-c88
Copy link

jay-c88 commented Apr 2, 2024

I managed to fix the problem by manually adding the missing json file from https://huggingface.co/BAAI/bge-small-en-v1.5/blob/main/1_Pooling/config.json

I hope this works for you as well.

Thanks, that solves the missing file, but now I get a different error.

jay@JPC:~/OpenDevin$ make start-backend
Starting backend...
Traceback (most recent call last):
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/bin/uvicorn", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main
    run(
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run
    server.run()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
    await self._serve(sockets)
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
    config.load()
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/jay/OpenDevin/opendevin/server/listen.py", line 4, in <module>
    import agenthub # noqa F401 (we import this to get the agents registered)
    ^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/__init__.py", line 5, in <module>
    from . import monologue_agent # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/OpenDevin/agenthub/monologue_agent/__init__.py", line 2, in <module>
    from .agent import MonologueAgent
  File "/home/jay/OpenDevin/agenthub/monologue_agent/agent.py", line 28, in <module>
    from agenthub.monologue_agent.utils.memory import LongTermMemory
  File "/home/jay/OpenDevin/agenthub/monologue_agent/utils/memory.py", line 37, in <module>
    embed_model = HuggingFaceEmbedding(
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/llama_index/embeddings/huggingface/base.py", line 86, in __init__
    self._model = SentenceTransformer(
                  ^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 191, in __init__
    modules = self._load_sbert_model(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 1246, in _load_sbert_model
    module = module_class.load(module_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/.local/share/virtualenvs/OpenDevin-JujB8J7i/lib/python3.11/site-packages/sentence_transformers/models/Pooling.py", line 228, in load
    config = json.load(fIn)
             ^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jay/anaconda3/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
make: *** [Makefile:24: start-backend] Error 1

@apurvns
Copy link

apurvns commented Apr 2, 2024

n-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json'

Thanks.. its working.. but have to run start-backend and start-frontend separately.

@Kurtisone
Copy link

I managed to fix the problem by manually adding the missing json file from https://huggingface.co/BAAI/bge-small-en-v1.5/blob/main/1_Pooling/config.json

I hope this works for you as well.

Doesn't work my side :

mv config.json /tmp/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/config.json

Three last lines output :

  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@Mgrsc
Copy link

Mgrsc commented Apr 2, 2024

Same Issue

@dheerajbhadani
Copy link

Hi @Kurtisone and @Mgrsc,

Can you paste the content of config.json?
Error suggests json file is empty.

@Kurtisone
Copy link

Hi @dheerajbhadani,

It's worse, I downloaded the webpage I guess..

@Kurtisone
Copy link

Yep, it's much better if I create the config.json and copy/paste the content, thank you !

@jay-c88
Copy link

jay-c88 commented Apr 2, 2024

Yeah, that was the issue. wget https://huggingface.co/BAAI/bge-small-en-v1.5/blob/main/1_Pooling/config.json somehow downloads a html as json file. Just copy paste the content into the json file manually

{
  "word_embedding_dimension": 384,
  "pooling_mode_cls_token": true,
  "pooling_mode_mean_tokens": false,
  "pooling_mode_max_tokens": false,
  "pooling_mode_mean_sqrt_len_tokens": false
}

@JustinLin610
Copy link
Contributor

JustinLin610 commented Apr 2, 2024

#573 here is the solution. tons of issues are related to the huggingfaceembedding...

@djaym7
Copy link

djaym7 commented Apr 3, 2024

OpenDevin git:(main) ✗ make start-frontend
Starting frontend...

opendevin-frontend@0.1.0 start
vite --port 3001

node:internal/errors:478
ErrorCaptureStackTrace(err);
^

Error: ENOSPC: System limit for number of file watchers reached, watch '/local/home/jdesa/Agent/OpenDevin/frontend/vite.config.ts'
at FSWatcher. (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2296:34)
at createFsWatchInstance (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44286:17)
at setFsWatchListener (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44333:15)
at NodeFsHandler._watchWithNodeFs (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44488:14)
at NodeFsHandler._handleFile (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44552:23)
at NodeFsHandler._addToNodeFs (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44794:21)
at async file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:45791:21
at async Promise.all (index 1)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:45987:10)
at NodeFsHandler._addToNodeFs (file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:44802:18)
at async file:///local/home/jdesa/Agent/OpenDevin/frontend/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:45791:21
at async Promise.all (index 1) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/local/home/jdesa/Agent/OpenDevin/frontend/vite.config.ts',
filename: '/local/home/jdesa/Agent/OpenDevin/frontend/vite.config.ts'
}
make: *** [start-frontend] Error 1

@madambovarix
Copy link

Same here. I can't "make start-backend" either because "import charset_normalizer as chardet, ModuleNotFoundError: No module named 'charset_normalizer'"

Same here. I tried the various solutions proposed but I still get this error.

@enyst
Copy link
Collaborator

enyst commented Apr 3, 2024

@madambovarix how about this?

Please can you try from these steps, the section "If pipenv doesn't work for you, you can also run" when you're in the opendevin directory:

python -m pipenv requirements > requirements.txt && python -m pip install -r requirements.txt

If it doesn't work, please open a new issue.

@madambovarix
Copy link

Yes, that did work, thanks ! I had to edit uvloop out of the dependancies tho since I'm on Windows and uvloop isn't supported since their last update, but it finally worked !

@yufansong
Copy link
Collaborator

Duplicate with #568

@zhipengzuo
Copy link

helllo ,anyone know where is the Macos dir show store this config.json?

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

No branches or pull requests