我有:
/home/stefan/workspace/git/master-thesis/data
设置在pythonpath和一些XML文件中,这些文件位于:
/home/stefan/workspace/git/master-thesis/data/semeval/*.xml
但是,如果我尝试打开收到的这些XML文件:
FileNotFoundError: [Errno 2] No such file or directory: 'ABSA16_Restaurants_Train_SB1_v2.xml'
这是否仅适用于模块?你知道吗
是的,在此路径上搜索模块,请参见documentation on PYTHONPATH:
您需要提供
open
的完整路径才能找到它(假定您不更改当前目录)。你知道吗相关问题 更多 >
编程相关推荐