Created
July 5, 2018 21:14
-
-
Save ywkaras/e9419612ba7879750673b9f5bab5993f to your computer and use it in GitHub Desktop.
Python format error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body = (''' | |
{ | |
"beacons": [ | |
{ | |
"url" : "http://127.0.0.1:{0}", | |
"action": "return_204" | |
} | |
], | |
"version": "0.1" | |
} | |
''' | |
).format(666) | |
Error: | |
Running Test beacon_intercept: | |
Generating Report: -------------- | |
Test: beacon_intercept: Exception | |
File: beacon_intercept.test.py | |
Directory: /Users/wkaras/REPOS/YTS/tests/gold_tests/pluginTest/beacon_intercept | |
Reason: Traceback (most recent call last): | |
File "/Users/wkaras/REPOS/YTS/tests/env-test/lib/python3.5/site-packages/autest/core/runtesttask.py", line 34, in __call__ | |
tl = self.__logic.Run(self.__test) | |
File "/Users/wkaras/REPOS/YTS/tests/env-test/lib/python3.5/site-packages/autest/runlogic/runlogic.py", line 18, in Run | |
if not tmp.Start(obj): | |
File "/Users/wkaras/REPOS/YTS/tests/env-test/lib/python3.5/site-packages/autest/runlogic/test.py", line 89, in Start | |
loadTest(self.__test) | |
File "/Users/wkaras/REPOS/YTS/tests/env-test/lib/python3.5/site-packages/autest/core/test.py", line 179, in loadTest | |
execFile(fileName, locals, locals) | |
File "/Users/wkaras/REPOS/YTS/tests/env-test/lib/python3.5/site-packages/autest/common/execfile.py", line 15, in execFile | |
exec (safeCompile(f.read(), fname), globals, locals) | |
File "/Users/wkaras/REPOS/YTS/tests/gold_tests/pluginTest/beacon_intercept/beacon_intercept.test.py", line 50, in <module> | |
).format(666) | |
KeyError: '\n "beacons"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment