2
這是我的代碼:的Python - Sikuli - ConfigParser.NoSectionError
import ConfigParser
configuration = ConfigParser.ConfigParser()
configuration.read('timesheetconfig.ini')
username = configuration.get('internal','username')
password = configuration.get('internal','password')
url = configuration.get('internal','url')
browser = configuration.get('internal','browser')
我也試着更換: configuration.read( 'C:\ SikuliConfig \ timesheetconfig.ini')
這is thetimesheetconfig.ini
[internal]
username = username
password = password
url = https://www.sometimesheeturl/login.html
browser = chrome
你知道我爲什麼要去?
[error] script [ ScriptName ] stopped with error in line 4
[error] ConfigParser.NoSectionError (No section: 'internal')
在Sikuli文檔
源搜索我剛纔想運行此代碼和它的作品。錯誤的原因可能是配置文件名中的拼寫錯誤,或者沒有提供正確的路徑 – skamsie