Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st.cache error #2409

Closed
HongLouyemeng opened this issue Dec 2, 2020 · 5 comments
Closed

st.cache error #2409

HongLouyemeng opened this issue Dec 2, 2020 · 5 comments
Labels
feature:cache Related to st.cache_data and st.cache_resource feature:cache-hash-func type:bug Something isn't working

Comments

@HongLouyemeng
Copy link

AttributeError: 'QueuePool' object has no attribute '_pool'
Traceback:
File "c:\python3.6.5\lib\site-packages\streamlit\script_runner.py", line 332, in _run_script
exec(code, module.dict)
File "D:\pycharm_workspace\weather_test\study_clode.py", line 105, in
df=get_data(farm_id, start_time, end_time, engine)
File "c:\python3.6.5\lib\site-packages\streamlit\caching.py", line 604, in wrapped_func
return get_or_create_cached_value()
File "c:\python3.6.5\lib\site-packages\streamlit\caching.py", line 586, in get_or_create_cached_value
return_value = func(*args, **kwargs)
File "D:\pycharm_workspace\weather_test\study_clode.py", line 29, in get_data
power_data = load_train.get_power_data()
File "D:\pycharm_workspace\weather_test\Data_Process.py", line 55, in get_power_data
mysql_power = pd.read_sql_query(sql_power, self.engine)
File "c:\python3.6.5\lib\site-packages\pandas\io\sql.py", line 332, in read_sql_query
chunksize=chunksize,
File "c:\python3.6.5\lib\site-packages\pandas\io\sql.py", line 1218, in read_query
result = self.execute(*args)
File "c:\python3.6.5\lib\site-packages\pandas\io\sql.py", line 1087, in execute
return self.connectable.execute(*args, **kwargs)
File "c:\python3.6.5\lib\site-packages\sqlalchemy\engine\base.py", line 2236, in execute
connection = self._contextual_connect(close_with_result=True)
File "c:\python3.6.5\lib\site-packages\sqlalchemy\engine\base.py", line 2304, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "c:\python3.6.5\lib\site-packages\sqlalchemy\engine\base.py", line 2338, in _wrap_pool_connect
return fn()
File "c:\python3.6.5\lib\site-packages\sqlalchemy\pool\base.py", line 364, in connect
return _ConnectionFairy._checkout(self)
File "c:\python3.6.5\lib\site-packages\sqlalchemy\pool\base.py", line 778, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "c:\python3.6.5\lib\site-packages\sqlalchemy\pool\base.py", line 495, in checkout
rec = pool._do_get()
File "c:\python3.6.5\lib\site-packages\sqlalchemy\pool\impl.py", line 118, in _do_get
return self._pool.get(wait, self._timeout)

@HongLouyemeng HongLouyemeng added type:bug Something isn't working status:needs-triage Has not been triaged by the Streamlit team labels Dec 2, 2020
@nthmost nthmost added feature:cache Related to st.cache_data and st.cache_resource feature:cache-hash-func and removed status:needs-triage Has not been triaged by the Streamlit team labels Dec 21, 2020
@theresa-salud
Copy link

I'm experiencing the same issue -- has there been a solution?

@HongLouyemeng
Copy link
Author

HongLouyemeng commented Feb 25, 2021 via email

@So-ham
Copy link

So-ham commented Apr 20, 2021

Facing the same issue. Please help!

@HongLouyemeng
Copy link
Author

我遇到了同样的问题-有解决方案吗?

from cachetools import cached

@HongLouyemeng
Copy link
Author

面对同样的问题。请帮忙!

from cachetools import cached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:cache Related to st.cache_data and st.cache_resource feature:cache-hash-func type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants