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

Doesn't work when http_proxy defined #4

Closed
japgolly opened this issue Jan 10, 2019 · 5 comments
Closed

Doesn't work when http_proxy defined #4

japgolly opened this issue Jan 10, 2019 · 5 comments
Assignees

Comments

@japgolly
Copy link

Bloop is failing to install via brew for me. I don't know Python but it seems to be a Python error when http_proxy env var is defined.

> brew install scalacenter/bloop/bloop
==> Installing bloop from scalacenter/bloop
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.2.1/install.py
Already downloaded: /Users/d123/Library/Caches/Homebrew/downloads/d91efabbbfaec67e4e1de7e04abd97a7de0d27adb0db550bd0f680cf25dbc90a--install.py
==> python3 install.py --dest bin --version 1.2.1
Last 15 lines from /Users/d123/Library/Logs/Homebrew/bloop/01.python3:

python3
install.py
--dest
bin
--version
1.2.1

Downloading Bloop's coursier version, this may take some seconds...
Traceback (most recent call last):
  File "install.py", line 272, in <module>
    coursier_bootstrap(BLOOP_SERVER_TARGET, "bloop.Server")
  File "install.py", line 202, in coursier_bootstrap
    http_proxy = urlparse(os.environ['http_proxy'])
TypeError: 'module' object is not callable
@jvican jvican self-assigned this Jan 10, 2019
@jvican
Copy link
Contributor

jvican commented Jan 10, 2019

Damn python. Will fix soon.

@jvican
Copy link
Contributor

jvican commented Jan 15, 2019

I can't reproduce this. What do you have inside http_proxy? Is it a valid proxy url? What happens if you remove them from your environment?

@japgolly
Copy link
Author

japgolly commented Jan 16, 2019

Proxy settings are:

> env|sort|grep -i proxy
ALL_PROXY=http://127.0.0.1:8080
FTP_PROXY=http://127.0.0.1:8080
HTTPS_PROXY=http://127.0.0.1:8080
HTTP_PROXY=http://127.0.0.1:8080
NRIA_PROXY=http://127.0.0.1:8080
RSYNC_PROXY=http://127.0.0.1:8080
all_proxy=http://127.0.0.1:8080
ftp_proxy=http://127.0.0.1:8080
http_proxy=http://127.0.0.1:8080
https_proxy=http://127.0.0.1:8080
no_proxy=localhost,127.0.0.*,10.*,192.168.*
rsync_proxy=http://127.0.0.1:8080

Python situation is

> which python        
/usr/local/bin/python

> python --version
Python 2.7.15

> which python2
/usr/local/bin/python2

> which python3 
/usr/local/bin/python3

> python3 --version   
Python 3.7.2

And unfortunately, if I unset the proxy env vars I lose internet access and bloop fails to install:

> brew install scalacenter/bloop/bloop
Updating Homebrew...
==> Installing bloop from scalacenter/bloop
==> Downloading https://github.com/scalacenter/bloop/releases/download/v1.2.1/install.py
Already downloaded: /Users/d123/Library/Caches/Homebrew/downloads/d91efabbbfaec67e4e1de7e04abd97a7de0d27adb0db550bd0f680cf25dbc90a--install.py
==> python3 install.py --dest bin --version 1.2.1
Last 15 lines from /Users/d123/Library/Logs/Homebrew/bloop/01.python3:
2019-01-16 15:18:26 +1100

python3
install.py
--dest
bin
--version
1.2.1

Downloading Bloop's coursier version, this may take some seconds...
<urlopen error [Errno 8] nodename nor servname provided, or not known>
Couldn't download https://github.com/coursier/coursier/raw/v1.1.0-M8/coursier, please try again.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/scalacenter/homebrew-bloop/issues

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:252:in `raise_api_error': curl failed!   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current (GitHub::Error)
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: api.github.com
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:206:in `open_api'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:324:in `search'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:257:in `search_issues'
	from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:270:in `issues_for_formula'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:372:in `fetch_issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:368:in `issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:422:in `dump'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:126:in `rescue in <main>'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:15:in `<main>'

@entangled90
Copy link

I have the same issue. Same python version, http_proxy & https_proxy is set to http://localhost:3128.

@jvican
Copy link
Contributor

jvican commented Jan 17, 2019

Thanks everyone for reporting, I'm cutting 1.2.3 with this change.

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

3 participants