Closed WangJing1900 closed 3 months ago
@WangJing1900 Hello there! I'm here to help you with any bugs, questions, or contributions you might have for the repository. Let me know how I can assist you!
To resolve the FutureWarning
error in your self-hosted (Docker) Dify version 0.6.9, you need to update the code in /app/api/core/rag/extractor/csv_extractor.py
at line 60 to use the on_bad_lines
argument instead of error_bad_lines
. Here is the updated code:
Replace the existing line 60:
df = pd.read_csv(csvfile, error_bad_lines=False, **self.csv_args)
with the updated line:
df = pd.read_csv(csvfile, on_bad_lines='skip', **self.csv_args)
This change will resolve the FutureWarning
error [1].
To continue the conversation, mention @dosu.
我使用ChatGPT回答的也是提示这样方式解决,但是我改了以后重启了服务器和docker,还是提示之前的错误,感觉修改的内容没有生效。
要确保对 /app/api/core/rag/extractor/csv_extractor.py
的更改正确应用,请按照以下步骤操作:
重建 Docker 镜像:
进入包含 Dockerfile
的目录,并运行以下命令以重建 Docker 镜像:
docker build -t your_image_name .
重启 Docker 容器: 重建镜像后,使用新镜像重启 Docker 容器。首先,停止现有容器:
docker stop your_container_name
然后,删除已停止的容器:
docker rm your_container_name
最后,使用更新的镜像运行新容器:
docker run -d --name your_container_name your_image_name
通过这些步骤,确保 /app/api/core/rag/extractor/csv_extractor.py
中的更改包含在新的 Docker 镜像中,并在容器重启时正确应用[1]。
To continue the conversation, mention @dosu.
Self Checks
Dify version
0.6.9
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
日志提示如下问题: df = pd.read_csv(csvfile, error_bad_lines=False, self.csv_args) /app/api/core/rag/extractor/csv_extractor.py:60: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a future version. Use on_bad_lines in the future. df = pd.read_csv(csvfile, error_bad_lines=False, self.csv_args)
✔️ Expected Behavior
No response
❌ Actual Behavior
No response