Skip to content

OSError: [Errno 36] File name too long with long Chinese prompt #1418

Closed
@qylf0000

Description

@qylf0000

========Below is the research topic
调查从2019年至2024年,中国市场智能手机每年销售前三名的手机型号和出品这个手机的公司,这三名手机型号当年销售量是多少,分别占当年中国手机的销售量百分比.
这三款手机的开售价格分别是多少钱,配置是什么,有什么特点.每款手机的主要购买人的职业和年龄分布.

==========Below is the error message
INFO: ('127.0.0.1', 50366) - "WebSocket /ws" [accepted]
INFO: connection open
2025-05-30 02:11:56,939 - backend.server.server_utils - ERROR - Error running task: [Errno 36] File name too long: 'outputs/task_1748542316_调查从2019年至2024年中国市场智能手机每年销售前三名的手机型号和出品这个手机的公司这三名手机型号当年销售量是多少分别占当年中国手机的
销售量百分比\n这三款手机的开售价格分别是多少钱配置是什么有什么特点每款手机的主要购买人的职业和年龄分布.json'
Traceback (most recent call last):
File "/home/xxxxxxxx/gpt-researcher/backend/server/server_utils.py", line 260, in safe_run
await awaitable
File "/home/xxxxxxxx/gpt-researcher/backend/server/server_utils.py", line 144, in handle_start_command
logs_handler = CustomLogsHandler(websocket, task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxxxxxx/gpt-researcher/backend/server/server_utils.py", line 31, in init
with open(self.log_file, 'w') as f:
^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 36] File name too long: 'outputs/task_1748542316_调查从2019年至2024年中国市场智能手机每年销售前三名的手机型号和出品这个手机的公司这三名手机型号当年销售量是多少分别占当年中国手机的销售量百分比\n这三款手机的开售价格分别是多少钱配置是什么有什么特点每款手机的主要购买人的职业和年龄分布.json'

==========If the research topic is shortened as below, no error occurs
调查从2019年至2024年,中国市场智能手机每年销售前三名的手机型号和出品这个手机的公司,这三名手机型号当年销售量是多少,分别占当年中国手机的销售量百分比.

My environment is: WSL2
gpt-researcher version: git clone 10 days ago and now are the same
Python version: python12

Additionally, I found a similar issue submission: #487

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions