matkoniecz / osm_bot_abstraction_layer

OSM bot abstraction layer building upon osmapi, to make easier to automate edits without causing problems.
GNU Affero General Public License v3.0
13 stars 1 forks source link

json.decoder.JSONDecodeError: Expecting ',' delimiter: #8

Open Marc-marc-marc opened 1 month ago

Marc-marc-marc commented 1 month ago

downloading https://www.openstreetmap.org/relation/18050854 Traceback (most recent call last): File "type-associatedstreet-france.py", line 27, in main() File "type-associatedstreet-france.py", line 11, in main run_simple_retagging_task( File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/generic_bot_retagging.py", line 254, in run_simple_retagging_task run_actual_edits(packages, is_in_manual_mode, changeset_comment, discussion_url, osm_wiki_documentation_page, edit_element_function, skip_on_nearby_notes) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/generic_bot_retagging.py", line 215, in run_actual_edits process_osm_elements_package(package, is_in_manual_mode, changeset_comment, discussion_url, osm_wiki_documentation_page, edit_element_function, skip_on_nearby_notes) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/generic_bot_retagging.py", line 117, in process_osm_elements_package data = modify_data_locally_and_show_changes(element.get_link(), edit_element_function) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/generic_bot_retagging.py", line 167, in modify_data_locally_and_show_changes data = osm_bot_abstraction_layer.get_and_verify_data(osm_link_to_object, prerequisites) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/osm_bot_abstraction_layer.py", line 191, in get_and_verify_data data = get_data_based_on_object_link(osm_object_url) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/osm_bot_abstraction_layer.py", line 61, in get_data_based_on_object_link return get_data(id, element_type) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/osm_bot_abstraction_layer.py", line 65, in get_data api = get_api('bot_account') File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/site-packages/osm_bot_abstraction_layer/osm_bot_abstraction_layer.py", line 16, in get_api data = json.load(f) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/json/init.py", line 293, in load return loads(fp.read(), File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/marc_marc/pyenv/versions/3.8.20/lib/python3.8/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 5 column 3 (char 76)

matkoniecz commented 1 month ago

Can you share code that you used to trigger this?

Marc-marc-marc commented 1 month ago

https://github.com/Marc-marc-marc/osm_bot_abstraction_layer/blob/master/fix/type-associatedstreet-france.py