topisani/Discurses

Installation on 3.6.4 fails (cannot import name 'Channel'`)

Opened this issue · 4 comments

I'm trying to get discurses up and running, but I'm not getting any far with that. First, I've tried installing it using pip, but it turns out I had only python 2.7 installed, and it couldn't work with it. So I installed python 3.6.4, pip3, and tried the same procedure. It always fails with this error:

Traceback (most recent call last):
  File "/usr/local/bin/discurses", line 6, in <module>
    from discurses.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/discurses/__main__.py", line 1, in <module>
    from . import discord
  File "/usr/local/lib/python3.6/dist-packages/discurses/discord.py", line 7, in <module>
    from discord import Channel, Message
ImportError: cannot import name 'Channel'

discord is installed, I've tried it already with multiple python versions (3.4, 3.6) and I've read though all the other issues on this repo which might be associated with it, I don't know what's wrong. What might be the issue?
Thanks for your help.

My Python version:

Python 3.6.4

pip3 freeze:

acme==0.22.2
aiohttp==3.5.4
aj==2.1.26
ajenti-panel==2.1.26
ajenti.plugin.dashboard==0.36
ajenti.plugin.filemanager==0.24
ajenti.plugin.notepad==0.25
ajenti.plugin.packages==0.28
ajenti.plugin.plugins==0.42
ajenti.plugin.services==0.27
ajenti.plugin.settings==0.24
ajenti.plugin.terminal==0.35
asgiref==3.1.2
asn1crypto==0.24.0
async-timeout==3.0.1
attrs==19.1.0
autobahn==19.3.3
Automat==0.7.0
beautifulsoup4==4.6.0
catfish==1.4.4
certbot==0.23.0
certbot-apache==0.23.0
certifi==2018.1.18
channels==2.2.0
chardet==3.0.4
command-not-found==0.3
ConfigArgParse==0.11.0
configobj==5.0.6
constantly==15.1.0
cookies==2.2.1
cryptography==2.1.4
cupshelpers==1.0
daphne==2.3.0
decorator==4.1.2
defer==1.0.6
discord==1.0.1
discord.py==1.0.1
discurses==0.3.5
distro-info===0.18ubuntu0.18.04.1
Django==2.2.1
enum34==1.1.6
fail2ban==0.10.2
future==0.15.2
gevent==1.4.0
gevent-socketio-master==0.3.6.99
gevent-websocket==0.10.1
gipc==1.0.1
greenlet==0.4.15
html5lib==0.999999999
httplib2==0.9.2
hyperlink==19.0.0
idna==2.8
idna-ssl==1.1.0
incremental==17.5.0
jadi==1.0.3
josepy==1.1.0
keyring==10.6.0
keyrings.alt==3.0
kitchen==1.2.5
language-selector==0.1
launchpadlib==1.10.6
lazr.restfulclient==0.13.5
lazr.uri==1.0.3
lightdm-gtk-greeter-settings==1.2.2
lockfile==0.12.2
lxml==4.2.1
menulibre==2.2.0
mock==2.0.0
mugshot==0.4.0
multidict==4.5.2
netifaces==0.10.4
oauth==1.0.1
olefile==0.45.1
onboard==1.4.1
parsedatetime==2.4
passlib==1.7.1
pbr==3.1.1
pexpect==4.2.1
Pillow==5.1.0
psutil==5.4.2
py==1.8.0
pyasn1==0.4.5
pyasn1-modules==0.2.5
pycairo==1.16.2
pycrypto==2.6.1
pycups==1.9.73
pycurl==7.43.0.1
pygobject==3.26.1
PyHamcrest==1.9.0
pyinotify==0.9.6
pyOpenSSL==17.5.0
pyRFC3339==1.0
python-apt==1.6.3+ubuntu1
python-augeas==0.5.0
python-daemon-3K==1.5.8
python-debian==0.1.32
python-debianbts==2.7.2
python-magic==0.4.16
pytz==2019.1
pyxdg==0.25
PyYAML==3.12
reportlab==3.4.0
requests==2.18.4
requests-unixsocket==0.1.5
retry==0.9.2
rtv==1.21.0
SecretStorage==2.3.1
setproctitle==1.1.10
sgt-launcher==0.2.4
simplejson==3.13.2
six==1.12.0
sqlparse==0.3.0
ssh-import-id==5.7
systemd-python==234
termcolor==1.1.0
tinydb==3.12.2
Twisted==19.2.0
txaio==18.8.1
typing-extensions==3.7.2
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.22
urwid==2.0.1
wadllib==1.3.2
webencodings==0.5
websockets==6.0
xcffib==0.5.1
xkit==0.0.0
yarl==1.3.0
zope.component==4.3.0
zope.event==4.2.0
zope.hookable==4.0.4
zope.interface==4.6.0

Getting exact same issue.

Looks like the discord.py dependency updated last month (Apr 8) with some breaking changes
[https://pypi.org/project/discord.py/#history]

You can install discord.py==0.16.12 to get discurses to run for now.

newbie here, can someone help with how to downgrade discord.py after install disucrses in a python 3.6 virtualenv

oops I was doing pip3

where as doing

pip install uninstall discord.py

and then

pip install discord.py==0.16.12

did the trick thanks