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

No Module named 'rainbowstream.consumer' #272

Closed ghost closed 4 years ago

ghost commented 6 years ago

Hi,

Recently I installed rainbowstream pip3 install -U rainbowstream

Ever since, I get this error when I launch rainbowstream:

Traceback (most recent call last): File "/usr/pip3/bin/rainbowstream", line 7, in <module> from rainbowstream.rainbow import fly File "/usr/pip3/lib/python3.6/site-packages/rainbowstream/rainbow.py", line 28, in <module> from .consumer import * ModuleNotFoundError: No module named 'rainbowstream.consumer'

carletes commented 6 years ago

Same here with Python 2.7.x:

(rainbowstream)$ rainbowstream 
Traceback (most recent call last):
  File "/home/carlos/.virtualenvs/rainbowstream/bin/rainbowstream", line 7, in <module>
    from rainbowstream.rainbow import fly
  File "/home/carlos/.virtualenvs/rainbowstream/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 28, in <module>
    from .consumer import *
ImportError: No module named consumer
(rainbowstream)$ 

My virtualenv:

(rainbowstream)$ pip freeze
arrow==0.12.1
backports.functools-lru-cache==1.5
Pillow==5.2.0
pocket==0.3.6
pyfiglet==0.7.5
PySocks==1.6.8
python-dateutil==2.7.3
rainbowstream==1.3.8
requests==2.5.3
six==1.11.0
twitter==1.18.0
(rainbowstream)$ 
carletes commented 6 years ago

Version 1.3.7 works OK, so it seems it's something that has been introduced in 1.3.8

ghost commented 6 years ago

Well I found a way to resolve this It’s a bit tricky, but it worked

  1. rm ~\ .rainbowstream_oath.json

  2. Create in the rainbowstream work directory the file consumer.py It should contain:

CONSUMER_KEY = ‘API Key’ CONSUMER_SECRET = ‘API Secret’ PCKT_CONSUMER_KEY = ‘Pocket API Key’ #Optional

  1. Launch Rainbowstream python rainbowstream.py or python3 rainbowstream.py

Rainbowstream will open firefox to and request authorization from twitter with a PIN Code, enter the pin code in the rainbowstream prompt and everything will work just fine

The most weird thing is the rainbowstram request is marked as twofi!!!

You can see this in the twitter settings/apps. Any ideas why it’s twofi and not rainbowstream ?

orakaro commented 6 years ago

Sorry about the inconvenience. PyPi interface has changed and looks like I missed something while upload version 1.3.8. I will release a fix version (maybe 1.3.9)

orakaro commented 6 years ago

1.3.9 is up and this should be fine now

Nikorasu commented 6 years ago

For some reason, I can't install 1.3.9 Running "sudo pip3 install rainbowstream" is still installing 1.3.8 Even tho if you run "pip3 search rainbowstream" it says "rainbowstream (1.3.9) - A smart and nice Twitter client on terminal." Is this normal? I assume I just have to wait a bit for things to update/propagate.. heh

kidandcat commented 6 years ago

Same, it install 1.3.8 even if 1.3.9 is available Very strange:

jairo@j:~/$ pip3 install rainbowstream==1.3.9
Collecting rainbowstream==1.3.9
  Could not find a version that satisfies the requirement rainbowstream==1.3.9 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.9, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8)
No matching distribution found for rainbowstream==1.3.9

jairo@j:~/$ pip3 search rainbowstream
rainbowstream (1.3.9)  - A smart and nice Twitter client on terminal.
  INSTALLED: 1.3.8
  LATEST:    1.3.9
kidandcat commented 6 years ago

This is what Pip says:

Skipping link https://files.pythonhosted.org/packages/6a/60/41b07473d0f39b9a51468adc4f9c2158a3d6bbc42a36b37ace5424c82a74/rainbowstream-1.3.9-py2-none-any.whl#sha256=f485e63fc5217541ef1d361803c074a155e88dc1aebf57dbb11e26c80aaa8308 (from https://pypi.org/simple/rainbowstream/); it is not compatible with this Python

@orakaro did you missed the python version flag somewhere? I'm trying with python 3.6.5 pip3 9.0.1

movalex commented 6 years ago

confirm that I also could not install RS 1.3.9 on Python 3.7:

pip install rainbowstream==1.3.9
Collecting rainbowstream==1.3.9
  Could not find a version that satisfies the requirement rainbowstream==1.3.9 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.9, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8)
No matching distribution found for rainbowstream==1.3.9

However on Python 2.7.15 it works.

orakaro commented 6 years ago

Maybe because of records inside setup.py. I guess I can not update already published version, so I will try to push version 1.4.0

orakaro commented 6 years ago

Version 1.4.0 should support Python 3.6.0 and 3.7.0 now. Please let me know if there is still any problem

movalex commented 6 years ago

works on 3.7 now, thanks!

ghost commented 6 years ago

Yeah I confirm, it works under python 3.6

But I still have this error at rainbowstream start:

We have connection problem with twitter stream API right now :( The Site Streams and User Streams endpoints have been turned off. Please migrate to alternate APIs. See https://t.co/usss

Any ideas ?

movalex commented 6 years ago

This error is related to Twitter API changes (User Stream deprecation) described in issue #271. For now you can update the feed manually by entering home command. This issue can be closed now.