Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Requests_cache #81

Closed
ogunjosam opened this issue Apr 12, 2021 · 4 comments
Closed

Requests_cache #81

ogunjosam opened this issue Apr 12, 2021 · 4 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@ogunjosam
Copy link

A new update in the package requests_cache (https://github.com/reclosedev/requests-cache/blob/master/requests_cache/core.py)
is throwing up an error "AttributeError: module 'requests_cache' has no attribute 'core'"

What is the workaround?

@ReagentX
Copy link
Owner

For now, pin that dependency an older version. I will push an update to fix this problem.

@ReagentX
Copy link
Owner

ReagentX commented Apr 12, 2021

requests_cache.install_cache(expire_after=timedelta(hours=1))
try:
requests_cache.core.remove_expired_responses()
except OperationalError:
requests_cache.core.uninstall_cache()
print('Unable to open cache or purge cache database, requests will not be cached!!!')

@ReagentX
Copy link
Owner

@ReagentX ReagentX added bug Something isn't working dependencies Pull requests that update a dependency file labels Apr 13, 2021
@ReagentX ReagentX self-assigned this Apr 13, 2021
ReagentX added a commit that referenced this issue Apr 13, 2021
@ReagentX ReagentX mentioned this issue Apr 13, 2021
@ReagentX
Copy link
Owner

ReagentX commented Apr 13, 2021

To see the changes, reinstall the package in your venv or upgrade it manually with pip install --upgrade purpleair

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants