You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the link fetching rate is too high, the new JSON data is appended to the last existing JSON file!
To Reproduce and Cause
When the interval time of writing the two files is less than one second.
ERROR while function read_history_files is trying to fetch last JSON file including duplicate JSON data.
File "/home/ubuntu/python/wikipedia-philosophy-game/src/philosophy-fast-crawler.py", line 403, in <module>
main()
File "/home/ubuntu/python/wikipedia-philosophy-game/src/philosophy-fast-crawler.py", line 393, in main
read_history_files( '../json/', files_history )
File "/home/ubuntu/python/wikipedia-philosophy-game/src/philosophy-fast-crawler.py", line 341, in read_history_files
data = json.load( handler )
File "/usr/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 22 column 2 (char 1174)
[2021-01-19 12:15:26] 26683 files are reading..
Expected behaviour
Create a new file by adding a counter number if the file exists.
The text was updated successfully, but these errors were encountered:
Describe the bug
When the link fetching rate is too high, the new JSON data is appended to the last existing JSON file!
To Reproduce and Cause
When the interval time of writing the two files is less than one second.
ERROR
while function
read_history_files
is trying to fetch last JSON file including duplicate JSON data.Create a new file by adding a counter number if the file exists.
The text was updated successfully, but these errors were encountered: