OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug]: ERROR: Parameter `file_text` is required for command: create.

Open amirshawn opened this issue 11 months ago • 4 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Describe the bug and reproduction steps

Multiple times I've had an agent have this error occur: ERROR: Parameter file_text is required for command: create. Instead of figuring out a different way to create the file or actually send that parameter, they continue to do the same thing over and over. It seems like after about 5 tries I'm able to get them to correct themselves. Each time the system hangs until it times out and then it does it again. It's very frustrating. I'm going to try to make a microagent who does something about this but I haven't had much luck using the microagents yet. Even when it realizes it's doing it wrong it still does it again:

I apologize for my mistake again. Let me use the correct syntax with the required file_text parameter:

Ran a Jupyter command ERROR: Parameter file_text is required for command: create.

OpenHands Installation

Development workflow

OpenHands Version

0.1.7

Operating System

MacOS

Logs, Errors, Screenshots, and Additional Context

No response

amirshawn avatar Jan 05 '25 12:01 amirshawn

Hi @amirshawn, do you mean you're using OpenHands v0.17.0 instead of 0.1.7? I've made a fix for it in this PR, which goes into release 0.18.0, can you upgrade and try again?

ryanhoangt avatar Jan 05 '25 13:01 ryanhoangt

I meant 0.17.0. I upgraded to 0.18.0 but it was giving me errors. I was going to wait for the next version before updating again. I'm glad to hear it's fixed! Thank you @ryanhoangt

amirshawn avatar Jan 05 '25 13:01 amirshawn

@ryanhoangt I thought I'd try installing 0.18.0 again but I had the same experience. I'm not able to start a conversation. The sessions starts and ends and I am redirected to the main page with a cleared session. Here is what it looks like when I run make build and make run:

Installing frontend dependencies with npm... npm warn ERESOLVE overriding peer dependency npm warn While resolving: @tanstack/[email protected] npm warn Found: [email protected] npm warn node_modules/react npm warn react@"^19.0.0" from the root project npm warn 167 more (@monaco-editor/react, @nextui-org/accordion, ...) npm warn npm warn Could not resolve dependency: npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/listbox npm warn npm warn Conflicting peer dependency: [email protected] npm warn node_modules/react npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/listbox npm warn ERESOLVE overriding peer dependency npm warn While resolving: @tanstack/[email protected] npm warn Found: [email protected] npm warn node_modules/react-dom npm warn react-dom@"^19.0.0" from the root project npm warn 68 more (@monaco-editor/react, @nextui-org/accordion, ...) npm warn npm warn Could not resolve dependency: npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/listbox npm warn npm warn Conflicting peer dependency: [email protected] npm warn node_modules/react-dom npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/listbox/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/listbox npm warn ERESOLVE overriding peer dependency npm warn While resolving: @tanstack/[email protected] npm warn Found: [email protected] npm warn node_modules/react npm warn react@"^19.0.0" from the root project npm warn 167 more (@monaco-editor/react, @nextui-org/accordion, ...) npm warn npm warn Could not resolve dependency: npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/select npm warn npm warn Conflicting peer dependency: [email protected] npm warn node_modules/react npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/select npm warn ERESOLVE overriding peer dependency npm warn While resolving: @tanstack/[email protected] npm warn Found: [email protected] npm warn node_modules/react-dom npm warn react-dom@"^19.0.0" from the root project npm warn 68 more (@monaco-editor/react, @nextui-org/accordion, ...) npm warn npm warn Could not resolve dependency: npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/select npm warn npm warn Conflicting peer dependency: [email protected] npm warn node_modules/react-dom npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from @tanstack/[email protected] npm warn node_modules/@nextui-org/select/node_modules/@tanstack/react-virtual npm warn @tanstack/react-virtual@"3.10.9" from @nextui-org/[email protected] npm warn node_modules/@nextui-org/select

[email protected] prepare cd .. && husky frontend/.husky

added 30 packages, removed 81 packages, changed 285 packages, and audited 1218 packages in 6s

339 packages are looking for funding run npm fund for details

found 0 vulnerabilities npm notice npm notice New major version of npm available! 10.9.0 -> 11.0.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0 npm notice To update run: npm install -g [email protected] npm notice Frontend dependencies installed successfully. Installing pre-commit hooks... pre-commit installed at .git/hooks/pre-commit Pre-commit hooks installed successfully. Building frontend...

[email protected] build npm run make-i18n && tsc && react-router build

[email protected] make-i18n node scripts/make-i18n-translations.cjs

vite v5.4.11 building for production... ✓ 3486 modules transformed. build/client/.vite/manifest.json 14.88 kB │ gzip: 1.80 kB build/client/assets/terminal-CFbL2ovg.css 4.64 kB │ gzip: 1.73 kB build/client/assets/root-Clr88Aw9.css 239.23 kB │ gzip: 27.47 kB build/client/assets/with-props-gi9rW2-k.js 0.35 kB │ gzip: 0.21 kB build/client/assets/objectWithoutPropertiesLoose-BjXSgPXB.js 0.37 kB │ gzip: 0.24 kB build/client/assets/arrow-send-t4y5vLh0.js 0.43 kB │ gzip: 0.31 kB build/client/assets/root-DAv4f0t3.js 0.63 kB │ gzip: 0.39 kB build/client/assets/oauth.github.callback-DWvnWMli.js 0.65 kB │ gzip: 0.42 kB build/client/assets/i18nInstance-CnyO1Rew.js 0.71 kB │ gzip: 0.45 kB build/client/assets/route-B6Wihwhh.js 0.86 kB │ gzip: 0.47 kB build/client/assets/settings-BirfeU04.js 0.87 kB │ gzip: 0.42 kB build/client/assets/browser-slice-o9DKZj9S.js 0.95 kB │ gzip: 0.52 kB build/client/assets/_oh.app.browser-BJ1pi7uI.js 1.12 kB │ gzip: 0.63 kB build/client/assets/infiniteQueryBehavior-BknQrgaa.js 1.67 kB │ gzip: 0.81 kB build/client/assets/auth-context-CNgPdLd6.js 2.14 kB │ gzip: 1.09 kB build/client/assets/iconBase-qaKKhmS-.js 2.51 kB │ gzip: 1.09 kB build/client/assets/index-aF-KBcXl.js 2.71 kB │ gzip: 1.24 kB build/client/assets/react-redux-DbTEHRXA.js 3.72 kB │ gzip: 1.71 kB build/client/assets/index-i_1qPgv3.js 5.14 kB │ gzip: 1.79 kB build/client/assets/store-yWf4Z6Or.js 5.45 kB │ gzip: 1.92 kB build/client/assets/use-config-CTFgY0_j.js 8.03 kB │ gzip: 2.93 kB build/client/assets/constants-CV93m4GH.js 9.35 kB │ gzip: 4.05 kB build/client/assets/browser-ponyfill-BLXkIlq-.js 10.27 kB │ gzip: 3.51 kB build/client/assets/index-husi-Obl.js 11.08 kB │ gzip: 4.47 kB build/client/assets/route-JPw0XU7Y.js 13.69 kB │ gzip: 5.80 kB build/client/assets/highlight-C6cjnpsf.js 13.79 kB │ gzip: 3.95 kB build/client/assets/route-Ss80nYW2.js 13.79 kB │ gzip: 5.17 kB build/client/assets/declaration-BiWNVssK.js 17.28 kB │ gzip: 4.12 kB build/client/assets/initial-query-slice-Dp_DDaya.js 18.97 kB │ gzip: 7.30 kB build/client/assets/index-DYhv2eKj.js 53.02 kB │ gzip: 18.53 kB build/client/assets/route-CakS7Wrc.js 60.88 kB │ gzip: 22.03 kB build/client/assets/settings-up-to-date-context-DiS1NiBw.js 62.44 kB │ gzip: 18.92 kB build/client/assets/github-logo-BRpTXp5D.js 63.94 kB │ gzip: 17.51 kB build/client/assets/upload-image-input-C72RwtIE.js 68.16 kB │ gzip: 30.92 kB build/client/assets/chunk-K6AXKMTT-KyAxkPYk.js 106.45 kB │ gzip: 36.02 kB build/client/assets/scroll-to-bottom-button-uUCmdPms.js 117.18 kB │ gzip: 36.19 kB build/client/assets/utils-C6z7b8Ss.js 123.41 kB │ gzip: 40.59 kB build/client/assets/custom-input-67g7-4e2.js 138.96 kB │ gzip: 44.80 kB build/client/assets/route-CLkmBnOk.js 154.80 kB │ gzip: 50.09 kB build/client/assets/entry.client-M8jMgIsd.js 183.85 kB │ gzip: 58.62 kB build/client/assets/open-hands-Cak-6Fqi.js 240.05 kB │ gzip: 78.18 kB build/client/assets/terminal-D_3Ao1ne.js 294.53 kB │ gzip: 74.12 kB build/client/assets/toast-TAqJ4ljK.js 670.56 kB │ gzip: 243.24 kB build/client/assets/_oh.app.jupyter-CJMII3bV.js 873.04 kB │ gzip: 293.47 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

  • Using dynamic import() to code-split the application
  • Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
  • Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 6.42s vite v5.4.11 building SSR bundle for production... ✓ 443 modules transformed. build/server/.vite/manifest.json 0.94 kB build/server/assets/terminal-CFbL2ovg.css 4.64 kB build/server/assets/server-build-Clr88Aw9.css 239.23 kB build/server/index.js 1.22 kB build/server/assets/terminal-CvUz8Ri2.js 6.69 kB build/server/assets/server-build-DnpIAhmZ.js 440.46 kB

✓ 1 asset moved from React Router server build to client assets. build/client/assets/server-build-Clr88Aw9.css

SPA Mode: index.html has been written to your build/client directory Removing the server build in /Users/amirshawn/OpenHands/frontend/build/server due to ssr:false ✓ built in 1.39s Build completed successfully. amirshawn@Amirs-MacBook-Pro OpenHands % make run Running the app... Starting backend server... Waiting for the backend to start... /Users/amirshawn/.cache/pypoetry/virtualenvs/openhands-ai-kbLovheG-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:

  • 'fields' has been removed warnings.warn(message, UserWarning) 17:17:50 - openhands:INFO: openhands_config.py:48 - Using config class None INFO: Started server process [47971] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:3000 (Press CTRL+C to quit) Backend started successfully. Starting frontend...

[email protected] dev npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev --port 3001 --host 127.0.0.1

[email protected] make-i18n node scripts/make-i18n-translations.cjs

Re-optimizing dependencies because lockfile has changed ➜ Local: http://127.0.0.1:3001/ ➜ press h + enter to show help INFO: 127.0.0.1:52550 - "GET /api/options/config HTTP/1.1" 200 OK INFO: 127.0.0.1:52557 - "GET /api/options/config HTTP/1.1" 200 OK INFO: 127.0.0.1:52561 - "GET /api/options/models HTTP/1.1" 200 OK INFO: 127.0.0.1:52558 - "GET /api/settings HTTP/1.1" 404 Not Found INFO: 127.0.0.1:52559 - "POST /api/settings HTTP/1.1" 200 OK INFO: 127.0.0.1:52560 - "POST /api/settings HTTP/1.1" 200 OK INFO: 127.0.0.1:52562 - "GET /api/options/agents HTTP/1.1" 200 OK INFO: 127.0.0.1:52564 - "GET /api/settings HTTP/1.1" 200 OK INFO: 127.0.0.1:52566 - "GET /api/settings HTTP/1.1" 200 OK INFO: 127.0.0.1:52568 - "GET /api/options/security-analyzers HTTP/1.1" 200 OK 17:20:02 - openhands:INFO: new_conversation.py:31 - Initializing new conversation 17:20:02 - openhands:INFO: new_conversation.py:36 - Loading settings 17:20:02 - openhands:INFO: new_conversation.py:39 - Settings loaded 17:20:02 - openhands:INFO: new_conversation.py:49 - Loading conversation store 17:20:02 - openhands:INFO: new_conversation.py:51 - Conversation store loaded 17:20:02 - openhands:INFO: new_conversation.py:57 - New conversation ID: a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: new_conversation.py:66 - Saving metadata for conversation a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: new_conversation.py:75 - Starting agent loop for conversation a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: manager.py:346 - maybe_start_agent_loop:a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: manager.py:349 - start_agent_loop:a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: manager.py:364 - _get_event_stream:a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: manager.py:367 - found_local_agent_loop:a871d18833084eff951635c61bbf2c11 17:20:02 - openhands:INFO: new_conversation.py:79 - Finished initializing conversation a871d18833084eff951635c61bbf2c11 INFO: 127.0.0.1:53041 - "POST /api/conversations HTTP/1.1" 200 OK 17:20:03 - openhands:INFO: docker_runtime.py:133 - [runtime a871d18833084eff951635c61bbf2c11] Starting runtime with image: docker.all-hands.dev/all-hands-ai/runtime:0.17-nikolaik 5:20:04 PM [vite] ✨ new dependencies optimized: react-syntax-highlighter, react-syntax-highlighter/dist/esm/styles/prism, socket.io-client, react-icons/vsc, react-icons/io5, @monaco-editor/react, react-markdown, remark-gfm, react-icons/io, react-icons/di 5:20:04 PM [vite] ✨ optimized dependencies changed. reloading INFO: 127.0.0.1:53072 - "GET /api/options/config HTTP/1.1" 200 OK INFO: 127.0.0.1:53092 - "GET /api/options/config HTTP/1.1" 200 OK INFO: 127.0.0.1:53093 - "GET /api/settings HTTP/1.1" 200 OK 17:20:17 - openhands:INFO: manager.py:434 - _cleanup_session:a871d18833084eff951635c61bbf2c11 17:20:17 - openhands:INFO: manager.py:458 - _close_session:a871d18833084eff951635c61bbf2c11 17:20:17 - openhands:INFO: manager.py:466 - removing connections: [] 17:20:17 - openhands:INFO: manager.py:475 - closing_session:a871d18833084eff951635c61bbf2c11

This is the 3rd time trying to upgrade. I've been updating as each new version has come out and this is the first time this has occured.

amirshawn avatar Jan 06 '25 01:01 amirshawn

@amirshawn is this happening on 0.18 or 0.19 at all?

mamoodi avatar Jan 07 '25 22:01 mamoodi

@mamoodi that was actually 0.17, I used 0.18 shortly and it seems like that was resolved. I am going to try 0.19 tonight and see how it works!

amirshawn avatar Jan 08 '25 02:01 amirshawn

@mamoodi I haven't had it occur at all in 0.18 or 0.19 so far.

amirshawn avatar Jan 08 '25 13:01 amirshawn

ERROR: Parameter file_text is required for command: create. -- This bug is back in 0.28.1

usgtexty avatar Mar 15 '25 23:03 usgtexty

hi, @ryanhoangt , this bug appeared in latest version again

cywan1998 avatar May 09 '25 07:05 cywan1998

I believe this issue is the same as #8369 , and it is fixed by #8370 from what I get(tested with a case both before the PR and after the PR)

CoreJa avatar May 09 '25 10:05 CoreJa