Ich wurde nach this tutorialapp.py sie zur Verfügung gestellt laufen.Python fileConfig Ausgabe
Mit dem ersten Versuch des Laufens app.py Ich hatte einen Fehler
Traceback (most recent call last):
File "E:/GIT_repos/SBD/rest_api_demo/rest_api_demo/app.py", line 11, in <module>
logging.config.fileConfig('logging.conf')
File "C:\Users\hunte\AppData\Local\Programs\Python\Python35\lib\logging\config.py", line 76, in fileConfig
formatters = _create_formatters(cp)
File "C:\Users\hunte\AppData\Local\Programs\Python\Python35\lib\logging\config.py", line 109, in _create_formatters
flist = cp["formatters"]["keys"]
File "C:\Users\hunte\AppData\Local\Programs\Python\Python35\lib\configparser.py", line 956, in __getitem__
raise KeyError(key)
KeyError: 'formatters'
Fehler verschwunden, nachdem ich Linie 11 in app.py ersetzt haben:
logging.config.fileConfig('logging.conf')
zu
logging.config.fileConfig('../logging.conf')
Frage War Code des Tutorials fehlerhaft oder ist es etwas, was ich & tat, was die Ursache dafür sein kann, dass andere Leute dieses Tutorial zu tun (ich nehme an, bei den Kommentaren suchen) hatte nichts zu ändern, während ich hatte?