crytic / solc-select

Manage and switch between Solidity compiler versions
GNU Affero General Public License v3.0
758 stars 103 forks source link

solc-select install not working [Version 1.0.4] #205

Closed rupen-pedalsup closed 1 year ago

rupen-pedalsup commented 1 year ago

Describe the issue:

In solc-select version 0.2.0, the "solc-select install" command working good. However, in the latest version, there are instances where this command may not work as expected on Linux (I'm using Ubuntu 22.04.3 LTS).

Code example to reproduce the issue:

Simply run "solc-select install" in linux (Ubuntu 22.04.3 LTS).

Version:

1.0.4

Relevant log output:

  File "/usr/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 1448, in connect
    super().connect()
  File "/usr/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.10/socket.py", line 845, in create_connection
    raise err
  File "/usr/lib/python3.10/socket.py", line 833, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pedalsup/.local/bin/solc-select", line 8, in <module>
    sys.exit(solc_select())
  File "/home/pedalsup/.local/lib/python3.10/site-packages/solc_select/__main__.py", line 56, in solc_select
    for version in get_installable_versions():
  File "/home/pedalsup/.local/lib/python3.10/site-packages/solc_select/solc_select.py", line 241, in get_installable_versions
    installable = list(set(get_available_versions()) - set(installed_versions()))
  File "/home/pedalsup/.local/lib/python3.10/site-packages/solc_select/solc_select.py", line 254, in get_available_versions
    github_json = urllib.request.urlopen(list_url).read()
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
jasmeenPedalsup commented 1 year ago

@rupen-pedalsup issue was coming because of https://raw.githubusercontent.com url

In india those people who are using JIO internet they can not access https://raw.githubusercontent.com url.

if you change internet to other provider like airtel, VI or any other then it works fine

for more information visit https://github.com/orgs/community/discussions/42655