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

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Jun 14, 2012

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

This comment has been minimized.

sqlalchemy-bot commented Jun 14, 2012

Michael Bayer (zzzeek) wrote:

ah thats new in 0.3.0, ill fix that now thanks

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jun 14, 2012

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

This comment has been minimized.

sqlalchemy-bot commented Jun 14, 2012

Changes by Michael Bayer (zzzeek):

  • changed status to closed
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jun 14, 2012

Mark (mhall) wrote:

Thank you for the quick fix. Works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment