orakaro / rainbowstream

A smart and nice Twitter client on terminal written in Python.
https://github.com/orakaro/rainbowstream
MIT License
3.54k stars 260 forks source link

Failed install on Python 3.9.5 #310

Open bdspinoza opened 3 years ago

bdspinoza commented 3 years ago

Tried installing Rainbowstream with pip, and the recommended way with venv, failed both times with this output:

Traceback (most recent call last): File "/home/eme/.local/bin/rainbowstream", line 5, in <module> from rainbowstream.rainbow import fly File "/home/eme/.local/lib/python3.9/site-packages/rainbowstream/rainbow.py", line 25, in <module> from .draw import * File "/home/eme/.local/lib/python3.9/site-packages/rainbowstream/draw.py", line 15, in <module> from .c_image import * File "/home/eme/.local/lib/python3.9/site-packages/rainbowstream/c_image.py", line 5, in <module> from .py3patch import * File "/home/eme/.local/lib/python3.9/site-packages/rainbowstream/py3patch.py", line 11, in <module> unescape = HTMLParser().unescape AttributeError: 'HTMLParser' object has no attribute 'unescape'

Running Python 3.9.5 on Manjaro Linux 21.0.5

I'm really not familiar with Python so any help is appreciated :)

GoodClover commented 3 years ago

Same issue here, Python 3.9.0 running Raspberry Pi OS (Debian 10/buster)

johnpiers commented 3 years ago

I posted my problem on the 16 May (basically exactly the same problem as the folk above and by the looks of it, a shit load of other people) and although quite a few people clicked the thumbs up on my post, got absolutely zero in terms of any answers or solutions. It's really such a pity as I've pretty much been using Rainbowstream since it was authored and absolutely loved using this but it seems like the end of the road for me anyway.

webgp-eu commented 3 years ago

Hello, I have looked at the code and, on my computer, with Python 3.9.5, it seems to work with the following modification: in the file py3patch.py, add at the top of the file: import html and replace line number 11: unescape = HTMLParser().unescape with unescape = html.unescape

I have not checked if this keeps the compatibilty with previous versions of python, though.

GP

P.S. In fact, I have just noticed that there is already a pull request (#305 ) with the same solution...

johnpiers commented 3 years ago

I'm at a loss for words! Followed your instructions and voilà, finally got everything working! Thank you so much.