问题描述
- py webdriver 读取csv中数据 提示:No such file or directory
-
1.本地在excel中创造数据,另存为 XX.csv 文件中
2.代码如下:
#-*-coding:utf-8-*-
import os
import csv #导入csv包#files = file('E:/selenium_python_script/script_indie/parametric/parametric_csv/userinfo.csv','rb')
files = file('E:/userinfo.csv','rb')
print files
data = csv.reader(files)问题:运行后,提示: No such file or directory
文件路径、文件名都是正确的,运行提示这个错误。请各位大牛帮处理下啊,谢谢!
解决方案
纠结了很久的错误
/Users/UserName/Library/Developer/Xcode/DerivedData/xxx-beqfpakeslcfgjghvltweyjadfjk/Build/Intermediates/xxx.build/Debug-iphoneos/xxx.build/Script-B354780B144C8CA2002C6922.sh:
line 4: /Dev......
答案就在这里:gen_entitlements.py: No such file or directory
解决方案二:
路径改成
files = file('E:userinfo.csv','rb')
时间: 2024-09-08 09:41:40