#登录系统
_Login_("zhulj","1")
为什么运行了报错:[size=15.0667px]Traceback (most recent call last): File "E:/自动化测试/test/登录客反.py", line 53, in <module> _Login_("zhulj","1") File "E:/自动化测试/test/登录客反.py", line 34, in _Login_ _WriteLog_(r"E:\自动化测试\test\登录客反.py") File "E:/自动化测试/test/登录客反.py", line 41, in _WriteLog_ logging.basicConfig(filename=logname) File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1781, in basicConfig h = FileHandler(filename, mode) File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1030, in __init__ StreamHandler.__init__(self, self._open()) File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1059, in _open return open(self.baseFilename, self.mode, encoding=self.encoding)FileNotFoundError: [Errno 2] No such file or directory: 'E:\\自动化测试\\test\\登录客反20170505\\18\\17135258.log'[size=15.0667px]
[size=15.0667px]求问不知道哪里出问题了
作者: 鹿小诞 时间: 2017-5-18 14:03
报错如下:
C:\Users\sunl\AppData\Local\Programs\Python\Python36\python.exe E:/自动化测试/test/登录客反.py
Traceback (most recent call last):
File "E:/自动化测试/test/登录客反.py", line 53, in <module>
_Login_("zhulj","1")
File "E:/自动化测试/test/登录客反.py", line 34, in _Login_
_WriteLog_(r"E:\自动化测试\test\登录客反.py")
File "E:/自动化测试/test/登录客反.py", line 41, in _WriteLog_
logging.basicConfig(filename=logname)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1781, in basicConfig
h = FileHandler(filename, mode)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1030, in __init__
StreamHandler.__init__(self, self._open())
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 1059, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'E:\\自动化测试\\test\\登录客反20170505\\18\\17135258.log'作者: 梦想家 时间: 2017-5-18 15:31
咋解决的 作者: jingzizx 时间: 2017-5-18 22:18 作者: 鹿小诞 时间: 2017-5-23 16:42