在我的系統上設置py.saunter時,我收到了saunter.ini文件的IO錯誤。設置py.sunter時saunter.ini的IO錯誤
目錄結構完全一樣的例子所示 - https://github.com/Element-34/Py.Saunter-Examples
下面是錯誤消息 -
IOError: [Errno 2] No such file or directory: '/src/conf/saunter.ini'
ERROR: Module: Tests could not be imported
(file:/Users/.../PythonWorkspace/PySaunter/src/scripts/Tests.py)
我知道有很多的進口相關的問題。他們中的大多數人建議添加init.py(如果尚未存在)。我在每個文件夾中都添加了init .py。
的代碼片段讀取saunter.ini是如下 -
def configure(self, config = "saunter.ini"):
self.config = ConfigParser.SafeConfigParser()
self.config.readfp(open(os.path.join("conf", config)))
任何幫助,將不勝感激......
我已經創建了一個saunter.ini文件,並將其置於conf文件夾下......如示例中所述。 – Thirumal 2013-02-14 03:18:00
我從eclipse運行項目作爲單元測試。 Py.Saunter不支持eclipse,需要它從命令行運行。 – Thirumal 2013-02-25 05:44:40