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

Failed to setup kenja behind proxy #138

Open
subaru44k opened this issue Mar 23, 2018 · 0 comments
Open

Failed to setup kenja behind proxy #138

subaru44k opened this issue Mar 23, 2018 · 0 comments

Comments

@subaru44k
Copy link

Thanks for the awesome tool!
I tried to install kenja with PC behind proxy and faced following problem.

$ python setup.py install
kenja/lib/java/java-parser.jar does not exist. Do you want to download it?[y/n]
y
md5 hash of kenja/lib/java/java-parser.jar is incorrect! remove it and tryagain.

This is because download_parser(self) method invokes urllib.urlretrieve() that does not consider proxy configuration.

    def download_parser(self):
        urllib.urlretrieve(self.parser_location, self.parser_path)

This can be modified by changing code as follows, since urllib2.urlopen() works based on http_proxy and https_proxy environment variables.

    def download_parser(self):
        with open(self.parser_path, 'wb') as f:
            f.write(urllib2.urlopen(self.parser_location).read())
            f.close()

Also I faced the similar problem on executing copy_csharp_parser() method. In this case I commented out the line and avoid the problem, since I only targets java source code in this time.

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