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

Implicit Contexts with Pyramid #28

Open
andrewjburnett opened this issue May 13, 2015 · 0 comments
Open

Implicit Contexts with Pyramid #28

andrewjburnett opened this issue May 13, 2015 · 0 comments

Comments

@andrewjburnett
Copy link

I am running into an issue when attempting to use implicit contexts within a Pyramid application.

Using Pyramid's built-in BeforeRender event I can call the push_store_context function at the beginning of my request/response lifecycle - this works fine.

However, when using either the finished callback or response callbacks to pop the context at the end of the request I encounter an "IndexError: pop from empty list." I have checked my code to make sure all of the "with store_context(store):" implementations have been removed. Nonetheless, the error still occurs. Does this have something to do with how the contexts are managed internally by sqlalchemy-imageattach? Maybe the context has been emptied by the time the pop_store_context function is being called by the finished_callback at the VERY end of the request/response cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant