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

Weather segment broken (Bad Yahoo Weather SSL Cert) in RHEL 9 #2259

Open
c0untzer0 opened this issue May 15, 2024 · 0 comments
Open

Weather segment broken (Bad Yahoo Weather SSL Cert) in RHEL 9 #2259

c0untzer0 opened this issue May 15, 2024 · 0 comments

Comments

@c0untzer0
Copy link

c0untzer0 commented May 15, 2024

The weather segment in RHEL 9 (Using Python 3.9, pip pulls version 2.7) seems to be broken. Looks like the weather data provider in this wthr.py is Yahoo Weather instead of OpenWeatherMap and the RHEL 9 root doesn't like the Yahoo API cert:

Traceback (most recent call last):
  File "/home/$user/.local/lib/python3.9/site-packages/powerline/lib/threaded.py", line 220, in update_one
    updates[key] = (monotonic(), self.compute_state(key))
  File "/home/$user/.local/lib/python3.9/site-packages/powerline/segments/common/wthr.py", line 140, in compute_state
    raw_response = urllib_read(url)
  File "/home/$user/.local/lib/python3.9/site-packages/powerline/lib/url.py", line 15, in urllib_read
    return urlopen(url, timeout=10).read().decode('utf-8')
  File "/usr/lib64/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib64/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib64/python3.9/urllib/request.py", line 555, in error
    result = self._call_chain(*args)
  File "/usr/lib64/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.9/urllib/request.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib64/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib64/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.9/urllib/request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib64/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'query.yahooapis.com'. (_ssl.c:1129)>

Is this an issue with the version being published for Python 3.9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants