{"action":"created","issue":{"url":"https://api.github.com/repos/glasslion/redlock/issues/8","labels_url":"https://api.github.com/repos/glasslion/redlock/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/glasslion/redlock/issues/8/comments","events_url":"https://api.github.com/repos/glasslion/redlock/issues/8/events","html_url":"https://github.com/glasslion/redlock/issues/8","id":104184847,"number":8,"title":"Error in Python 2.7","user":{"login":"svan1","id":1769651,"avatar_url":"https://avatars.githubusercontent.com/u/1769651?v=3","gravatar_id":"","url":"https://api.github.com/users/svan1","html_url":"https://github.com/svan1","followers_url":"https://api.github.com/users/svan1/followers","following_url":"https://api.github.com/users/svan1/following{/other_user}","gists_url":"https://api.github.com/users/svan1/gists{/gist_id}","starred_url":"https://api.github.com/users/svan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svan1/subscriptions","organizations_url":"https://api.github.com/users/svan1/orgs","repos_url":"https://api.github.com/users/svan1/repos","events_url":"https://api.github.com/users/svan1/events{/privacy}","received_events_url":"https://api.github.com/users/svan1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-01T04:34:08Z","updated_at":"2015-09-07T16:27:42Z","closed_at":null,"body":"The following code results in a runtime error\r\n\r\nfrom redlock import RedLock\r\n\r\nlock = RedLock(\"distributed_lock\")\r\nlock.acquire()\r\nprint \"Hello\"\r\nlock.release()\r\n\r\n\r\nThe error is :\r\n\r\n....\r\n    lock = RedLock(\"distributed_lock\")\r\n  File \"build\\bdist.win32\\egg\\redlock\\lock.py\", line 98, in __init__\r\nTypeError: type object argument after ** must be a mapping, not str\r\n\r\nI think the initialization of connection_details should have a bracket as follows.\r\n\r\n        if connection_details is None:\r\n            connection_details = [{\r\n                'host': ' localhost',\r\n                'port': 6379,\r\n                'db': 0,\r\n            }]"},"comment":{"url":"https://api.github.com/repos/glasslion/redlock/issues/comments/138335595","html_url":"https://github.com/glasslion/redlock/issues/8#issuecomment-138335595","issue_url":"https://api.github.com/repos/glasslion/redlock/issues/8","id":138335595,"user":{"login":"svan1","id":1769651,"avatar_url":"https://avatars.githubusercontent.com/u/1769651?v=3","gravatar_id":"","url":"https://api.github.com/users/svan1","html_url":"https://github.com/svan1","followers_url":"https://api.github.com/users/svan1/followers","following_url":"https://api.github.com/users/svan1/following{/other_user}","gists_url":"https://api.github.com/users/svan1/gists{/gist_id}","starred_url":"https://api.github.com/users/svan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svan1/subscriptions","organizations_url":"https://api.github.com/users/svan1/orgs","repos_url":"https://api.github.com/users/svan1/repos","events_url":"https://api.github.com/users/svan1/events{/privacy}","received_events_url":"https://api.github.com/users/svan1/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T16:27:42Z","updated_at":"2015-09-07T16:27:42Z","body":"I have Windows7 Professional 64-bit and Python 2.7\n\n\nC:\\Projects\\Python\\redlocktest>cat simple.py\nfrom redlock import RedLock\n\nlock = RedLock(\"distributed_lock\")\nlock.acquire()\nprint \"Hello\"\nlock.release()\nC:\\Projects\\Python\\redlocktest>./simple.py\n'.' is not recognized as an internal or external command,\noperable program or batch file.\n\nC:\\Projects\\Python\\redlocktest>simple.py\nTraceback (most recent call last):\n  File \"C:\\Projects\\Python\\redlocktest\\simple.py\", line 3, in <module>\n    lock = RedLock(\"distributed_lock\")\n  File \"build\\bdist.win32\\egg\\redlock\\lock.py\", line 98, in __init__\nTypeError: type object argument after ** must be a mapping, not str\n\nC:\\Projects\\Python\\redlocktest>python --version\nPython 2.7.6\n\nC:\\Projects\\Python\\redlocktest>\n\n\nI hope that helps.\n\n\n      From: Leo Zhou <notifications@github.com>\n To: glasslion/redlock <redlock@noreply.github.com> \nCc: svan1 <sreekant.sreedharan@yahoo.com> \n Sent: Monday, September 7, 2015 6:35 PM\n Subject: Re: [redlock] Error in Python 2.7 (#8)\n   \nI can not reproduce this bug. Could you pls provide more details about your environment?—\nReply to this email directly or view it on GitHub.  \n\n  "}}