加载.txt在Linux上失败但在mac上运行正常

时间:2017-06-17 19:36:04

标签: python linux macos pandas

 url = "http://download.cms.gov/some_filename_.zip"
 dest_dir = "dataset"
 filename = dest_dir + "/" + url.split("/")[-1].split(".")[0]+".txt"
 drugs = pd.read_table(filename)

上面的行在mac os上运行正常,但在Linux上有些失败。当我打印文件名时,两者都给出相同的输出'dataset / some_filename_.txt'。我在linux上得到的错误信息是

 can't find b'dataset/some_filename_.txt' file. 

很奇怪,因为目录中有文件。需要帮助!

0 个答案:

没有答案