-
Notifications
You must be signed in to change notification settings - Fork 5
fix: proper repo location on autoupdate #152
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
Conversation
|
I am not able to run the UI from source code because again SSL errors from pypi api.
2023-08-28 11:32:26,874 - DEBUG - Populating the table with virtual environments.
2023-08-28 11:32:26,881 - DEBUG - Populating the table with python and conda forge versions.
2023-08-28 11:32:26,881 - DEBUG - Found the following unified Ansys installation versions: {232: 'C:\\Program Files\\ANSYS Inc\\v232', 231: 'C:\\Program Files\\ANSYS Inc\\v231', 221: 'C:\\Program Files\\ANSYS Inc\\v221'}
2023-08-28 11:32:27,255 - DEBUG - Starting new HTTPS connection (1): pypi.python.org:443
Traceback (most recent call last):
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect()
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connection.py", line 642, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connection.py", line 783, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\util\ssl_.py", line 469, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\util\ssl_.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Program Files\ANSYS Inc\v232\commonfiles\CPython\3_10\winx64\Release\python\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "C:\Program Files\ANSYS Inc\v232\commonfiles\CPython\3_10\winx64\Release\python\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "C:\Program Files\ANSYS Inc\v232\commonfiles\CPython\3_10\winx64\Release\python\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/pyansys/json (Caused by
SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\src\ansys\tools\installer\__main__.py", line 6, in <module>
open_gui()
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\ansys\tools\installer\main.py", line 680, in open_gui
window = AnsysPythonInstaller()
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\ansys\tools\installer\main.py", line 123, in __init__
self.installed_table_tab = InstalledTab(self)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\ansys\tools\installer\installed_table.py", line 281, in
__init__
self.update_package_combo(0)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\ansys\tools\installer\installed_table.py", line 362, in
update_package_combo
self._cached_versions[package_name] = get_pkg_versions(package_name)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\ansys\tools\installer\common.py", line 88, in get_pkg_versions
releases = json.loads(requests.get(url).content)["releases"]
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\users\mkanchan\Work\pyansys\source\python-installer-qt-gui\.venv\lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/pyansys/json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))) |
|
@kmahajan-cadfem - yep got it... Keeping track of a hardcoded list of versions might be a high-burden to pay for... What I can do, though, is to avoid the failure and just show the list of packages. That way, if you then request the installation of a certain package, you would just get the latest version of it (i.e. it's like instead of doing Would that work? |
I agree, maintaining list is a manual work and would not be efficient. but just list without versions(i think this is already there) would be a great advantage and it is better to tell user what is failing or it should not fail to open. once the user at least reaches to the UI , |
|
Just did some implementation "simulating" your case (no connection to the PyPI API). Let me know what you think. I'll upload the changes pypi-api.webm |
|
This looks great 👍 |
|
Awesome, thanks @kmahajan-cadfem! Please review and approve whenever you have the chance so that we can merge it in that case. Glad it solved your issues! |

As title says. I will also try to fix #93
ansys/python-installer-qt-guiinstead ofpyansys/python-installer-qt-guitry...except. Closes Persistent SSL certificate issues #93