1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| [test] C:\Users\Benj\Documents\Projet_tuteure\WikiBot-2016-01-17\WikiBot\wptools-master\wptools-master>python infobox.py lyon | jsonlint
Traceback (most recent call last):
File "C:\Users\Benj\Documents\Projet_tuteure\WikiBot-2016-01-17\WikiBot\wptools-master\wptools-master\wptools\extract.py", line 134, in parsetree
data = json.loads(data)
File "C:\Anaconda3\envs\test\lib\json\__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "infobox.py", line 45, in <module>
main(args.title, args.t, args.v, args.w)
File "infobox.py", line 27, in main
print(wptools.infobox(data))
File "C:\Users\Benj\Documents\Projet_tuteure\WikiBot-2016-01-17\WikiBot\wptools-master\wptools-master\wptools\extract.py", line 125, in infobox
ptree = parsetree(data)
File "C:\Users\Benj\Documents\Projet_tuteure\WikiBot-2016-01-17\WikiBot\wptools-master\wptools-master\wptools\extract.py", line 145, in parsetree
return json.loads(data)["error"]["info"].encode('utf-8')
File "C:\Anaconda3\envs\test\lib\json\__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
[Error: Parse error on line 1:
^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF'] |
Partager