dataprofessor / streamlit_freecodecamp

Build 12 Data Apps in Python with Streamlit
577 stars 541 forks source link

Issue with EDA Crypto Currency #6

Closed viharieyunni closed 2 years ago

viharieyunni commented 2 years ago

2021-07-25 15:14:41.237 Traceback (most recent call last): File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 509, in get_or_create_cached_value return_value = _read_from_cache( File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 308, in _read_from_cache raise e File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 293, in _read_from_cache return _read_from_mem_cache( File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 212, in _read_from_mem_cache raise CacheKeyNotFoundError("Key not found in mem cache") streamlit.caching.CacheKeyNotFoundError: Key not found in mem cache

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/script_runner.py", line 350, in _run_script exec(code, module.dict) File "/Users/viharieyunni/Desktop/dswebapps/EDACrypto_main.py", line 96, in df = load_data() File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 543, in wrapped_func return get_or_create_cached_value() File "/Users/viharieyunni/opt/anaconda3/envs/datasci-env/lib/python3.9/site-packages/streamlit/caching.py", line 527, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/Users/viharieyunni/Desktop/dswebapps/EDACrypto_main.py", line 79, in load_data percent_change_1h.append(i['quote'][currency_price_unit]['percent_change_1h']) KeyError: 'percent_change_1h'

There is 'percent_change_1h' value yet it is throwing an error

viharieyunni commented 2 years ago

Solved it.