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

OSError: [Errno 36] File name too long #487

Open
mike12432 opened this issue May 9, 2024 · 12 comments
Open

OSError: [Errno 36] File name too long #487

mike12432 opened this issue May 9, 2024 · 12 comments

Comments

@mike12432
Copy link

Running in a MAC Docker Container at the end of researching I receive an error related to file name length.

workaround is to make shorter quarries.

ine 348, in app
gpt-researcher-1 | await dependant.call(**values)
gpt-researcher-1 | File "/usr/src/app/backend/server.py", line 58, in websocket_endpoint
gpt-researcher-1 | md_path = await write_text_to_md(report, filename)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/src/app/backend/utils.py", line 32, in write_text_to_md
gpt-researcher-1 | await write_to_file(file_path, text)
gpt-researcher-1 | File "/usr/src/app/backend/utils.py", line 19, in write_to_file
gpt-researcher-1 | async with aiofiles.open(filename, "w", encoding='utf-8') as file:
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/aiofiles/base.py", line 98, in aenter
gpt-researcher-1 | self._obj = await self._coro
gpt-researcher-1 | ^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/aiofiles/threadpool/init.py", line 94, in open
gpt-researcher-1 | f = yield from loop.run_in_executor(executor, cb)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
gpt-researcher-1 | result = self.fn(*self.args, **self.kwargs)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | OSError: [Errno 36] File name too long: 'outputs/task_1715258626
/this is my quarry which I have removed and replaced with this string that is still not as long as my quarry xxxxxxxxxx more xxxxxx you get the idea, this md file should be a file name that is not the same as the original quarry. .md'
gpt-researcher-1 | INFO: connection closed

@assafelovic
Copy link
Owner

Hey @mike12432 have you pulled the latest release?

@mike12432
Copy link
Author

mike12432 commented May 9, 2024 via email

@assafelovic
Copy link
Owner

@mike12432 fixed in latest version

@mike12432
Copy link
Author

mike12432 commented May 11, 2024 via email

@mike12432
Copy link
Author

I pulled the latest repo, cleared out all images and files in Docker and rebuilt. I am still having the issue on both the research and detailed reports, do I need to wait for the next release before this will work?

@smjure
Copy link

smjure commented May 13, 2024

Same here, cloned the latest version, the too-long-file-name problem still present. It seems the research is finished but then cannot download the PDF file, which is eventually my intention.

@assafelovic assafelovic reopened this May 14, 2024
@assafelovic
Copy link
Owner

@smjure can you please share the query and/or error log?

@smjure
Copy link

smjure commented May 15, 2024

@assafelovic I've tried to reproduce it, but strangely cannot.... if it happens again, will post it here.

@klimentij
Copy link

SCR-20240515-kri

Same here, all default settings, latest Docker

@assafelovic
Copy link
Owner

Hey all, fixed here: bd75c9b

Please pull latest and try again. Should be good now!

@assafelovic
Copy link
Owner

@klimentij @smjure @mike12432 fyi

@mike12432
Copy link
Author

Thank you, seems to be fixed. But I noticed the print PDF button is not on the Detailed report page, not sure if it was ever there or the remediation removed it. Anyway I wont open a ticket on it as its not a feature important to me. Thanks for your work and thanks for updating to GPT-4o, total run of detailed report was 37 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants