{"action":"closed","issue":{"url":"https://api.github.com/repos/rbcarson/pypac/issues/2","repository_url":"https://api.github.com/repos/rbcarson/pypac","labels_url":"https://api.github.com/repos/rbcarson/pypac/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/rbcarson/pypac/issues/2/comments","events_url":"https://api.github.com/repos/rbcarson/pypac/issues/2/events","html_url":"https://github.com/rbcarson/pypac/issues/2","id":202020668,"number":2,"title":"AttributeError: module 'js2py.translators' has no attribute 'pyjsparser'","user":{"login":"jfroy3","id":25236179,"avatar_url":"https://avatars.githubusercontent.com/u/25236179?v=3","gravatar_id":"","url":"https://api.github.com/users/jfroy3","html_url":"https://github.com/jfroy3","followers_url":"https://api.github.com/users/jfroy3/followers","following_url":"https://api.github.com/users/jfroy3/following{/other_user}","gists_url":"https://api.github.com/users/jfroy3/gists{/gist_id}","starred_url":"https://api.github.com/users/jfroy3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfroy3/subscriptions","organizations_url":"https://api.github.com/users/jfroy3/orgs","repos_url":"https://api.github.com/users/jfroy3/repos","events_url":"https://api.github.com/users/jfroy3/events{/privacy}","received_events_url":"https://api.github.com/users/jfroy3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-20T01:02:02Z","updated_at":"2017-01-20T07:16:55Z","closed_at":"2017-01-20T07:16:55Z","body":"I installed pypac using pip on a fresh Python 3.6.0 install and I get the following error when trying to run the three lines sample:\r\n```\r\nPython 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.`\r\n>>> from pypac import PACSession\r\n>>> session = PACSession()\r\n>>> session.get('http://www.google.com')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"C:\\Users\\jfroy3\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\requests\\sessions.py\", line 501, in get\r\n    return self.request('GET', url, **kwargs)\r\n  File \"C:\\Users\\jfroy3\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\pypac\\api.py\", line 150, in request\r\n    self.get_pac()\r\n  File \"C:\\Users\\jfroy3\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\pypac\\api.py\", line 215, in get_pac\r\n    pac = get_pac()\r\n  File \"C:\\Users\\jfroy3\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\pypac\\api.py\", line 41, in get_pac\r\n    return PACFile(downloaded_pac)\r\n  File \"C:\\Users\\jfroy3\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages\\pypac\\parser.py\", line 20, in __init__\r\n    orig_pyimport_meth = js2py.translators.pyjsparser.PyJsParser.parsePyimportStatement\r\nAttributeError: module 'js2py.translators' has no attribute 'pyjsparser'\r\n```\r\n\r\nI'm not sure why and what the correct fix is, but I managed to patch it by removing 'pyjsparser.' from parser.py on lines 20, 21 and 33, like this:\r\n```\r\n20:        orig_pyimport_meth = js2py.translators.PyJsParser.parsePyimportStatement\r\n21:        js2py.translators.PyJsParser.parsePyimportStatement = _raise_pyimport_error\r\n...\r\n33:            js2py.translators.PyJsParser.parsePyimportStatement = orig_pyimport_meth\r\n```"}}
{"actor":{"display_login":"rbcarson"}}