question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wttr.in still uses python 2.

Code syntax is compatible with python 3, but there are several string/Unicode-related issue in the code, like this:

[root@xyz wttr.in]# ve/bin/python bin/srv.py
Traceback (most recent call last):
  File "bin/srv.py", line 20, in <module>
    import wttr_srv
  File "/root/wttr.in/lib/wttr_srv.py", line 23, in <module>
    from location import is_location_blocked, location_processing
  File "/root/wttr.in/lib/location.py", line 185, in <module>
    LOCATION_ALIAS = load_aliases(ALIASES)
  File "/root/wttr.in/lib/location.py", line 171, in load_aliases
    from_, to_ = line.decode('utf-8').split(':', 1)
AttributeError: 'str' object has no attribute 'decode'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
chubincommented, May 13, 2020

Now Python 3 is fully supported and should be used to run wttr.in. Python 2 is out of support now

1reaction
chubincommented, Feb 12, 2020

@caywin25 It is not fully compatible. In https://github.com/chubin/wttr.in/commit/e5ab61dea31d863d4b280d08bc57a1d32c269bae, I’ve added several workarounds, so it at least starts, but some of the dependencies does no support python3, so several features are not running with python 3 at the moment (all related to v2 and one-line mode).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python - endoflife.date
Release Released Security Support 3.11 1 month and 3 weeks ago. (24 Oct 2022) Ends in 4 years and 10 months. (24 Oct 2... 3.10...
Read more >
Status of Python Versions - Python Developer's Guide
Supported Versions#. Dates shown in italic are scheduled and can be adjusted. Branch. Schedule. Status. First release. End of life. Release manager. main....
Read more >
Python 3.0 Release
Are you a PSF Supporting Member yet? We're halfway to our goal of 100 new Supporting Members by the end of 2022! Can...
Read more >
Porting Python 2 Code to Python 3 — Python 3.11.1 ...
A key point about supporting Python 2 & 3 simultaneously is that you can start today! Even if your dependencies are not supporting...
Read more >
Python Documentation by Version - Python.org
Python 3.10.3, documentation released on 16 March 2022. ... We're halfway to our goal of 100 new Supporting Members by the end of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found