Python3:尝试打开pd时出现消息错误

2024-09-30 18:29:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我有问题的代码,过去工作在几个星期。你知道吗

问题来自我代码的这部分:

TypeError: ifile  = open('0_Inputs/CompaniesList.csv', "r", encoding = 'utf-8')

我收到了以下信息:

open() got an unexpected keyword argument 'encoding'

如果我尝试:

ifile  = open('0_Inputs/CompaniesList.csv', "r")

我还有一个错误:

OSError: cannot identify image file '0_Inputs/CompaniesList.csv'

我在做from PyPDF2 import PdfFileReader, PdfFileWriter,但我不知道库之间是否有冲突?你知道吗

谢谢你!你知道吗


Tags: csv代码an信息openargumentkeywordutf