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

Calling region.get with a key with no value throws an exception #8

Closed
sqlalchemy-bot opened this issue Jun 14, 2012 · 4 comments
Closed
Labels
bug Something isn't working high priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Mark (mhall)

If I call region.get('missing_key'), then I get the following exception:

File "/home/mhall/Projects/workspace/Storyana/src/storyana/backend.py", line 175, in has_story

return region.get(page_name) != api.NO_VALUE

File "/home/mhall/Projects/workspace/Storyana/virtualenv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 272, in get
time.time() - value.metadata["ct"] > expiration_time:

AttributeError: 'NoValue' object has no attribute 'metadata'

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

ah thats new in 0.3.0, ill fix that now thanks

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

this bug is actually in 0.2.4 also, so glad I've kept that "alpha" flag on there so far ;)

[[https://bitbucket.org/zzzeek/dogpile.cache/changeset/3c7bc59874bf2bc7725216aa4005eb906a40bd73|3c7bc59874bf2bc7725216aa4005eb906a40bd73]]

thanks for reporting, let me know what else and if it works OK for you we'll do a release (since 0.2.4 is pretty broken).

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

Mark (mhall) wrote:

Thank you for the quick fix. Works now.

@sqlalchemy-bot sqlalchemy-bot added bug Something isn't working high priority labels Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

No branches or pull requests

1 participant