Closed somu24 closed 6 months ago
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Hi @somu24, thanks for reporting. I can't reproduce the error though. Does it still happen? It looks to me as if nominatim isn't returning a valid result. Which location are you trying as input? Does it happen with all locations?
Yes, it happens for all the location, it is some Jsondecode error,
Still can't reproduce it. Could you please pull the latest code and run again? Are there any other error messages?
Could you add print(location)
after line 756 in meteo_hist/base.py and run again? What is the output?
https://github.com/yotkadata/meteo_hist/blob/7f3983906665578a1e091414425062fc7dae21b7/meteo_hist/base.py#L756
Yes, it's absolutely working fine now, really thanks a lot
getting the following error when we submit the location File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script exec(code, module.dict) File "C:\Users\Admin\meteo_hist\app.py", line 68, in
main()
File "C:\Users\Admin\meteo_hist\app.py", line 64, in main
build_content(plot_placeholder, message_box)
File "C:\Users\Admin\meteo_hist\app\build.py", line 118, in build_content
input_processed = process_form(st.session_state["input_values"], message_box)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\meteo_hist\app\forms.py", line 253, in process_form
lat, lon, location = build_location_by_name(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\meteo_hist\app\utils.py", line 219, in build_location_by_name
location = MeteoHist.get_lat_lon(location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\meteo_hist\meteo_hist\base.py", line 506, in get_lat_lon
location = location.json()
^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)