Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Unable to use RedisSession #5

Closed
bbergmann opened this issue Nov 18, 2011 · 2 comments
Closed

Unable to use RedisSession #5

bbergmann opened this issue Nov 18, 2011 · 2 comments

Comments

@bbergmann
Copy link

Unable to use RedisSession:

in chatdemo.py:
...
import redis

class Application(anzu.web.Application):
def init(self):
settings = dict(
#other settings
#....
session_storage = "redis://", #redis://[auth@][host[:port]][/db]
)
anzu.web.Application.init(self, **settings)

result:
(anzu)unknown:chat bbergmann$ python chatdemo.py
Traceback (most recent call last):
File "chatdemo.py", line 203, in
main()
File "chatdemo.py", line 197, in main
app = Application()
File "chatdemo.py", line 52, in init
anzu.web.Application.init(self, **settings)
File "/Developer/anzu/lib/python2.7/site-packages/anzu-2.1.1-py2.7.egg/anzu/web.py", line 1290, in init
settings['session_storage'])
TypeError: unbound method _parse_connection_details() must be called with RedisSession instance as first argument (got str instance instead)

How do I make this work?

@bbergmann
Copy link
Author

suggested solution _parse_connection_details() needs to be a static method:

insert @staticmethod at line 389 session.py

@mark-kubacki
Copy link
Owner

Indeed - thanks a lot for reporting. Fixed.
03ac868

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

No branches or pull requests

2 participants