lemon65 / lemon_bot_discord

Discord bot for the VOIP server
9 stars 6 forks source link

SyntaxError when running lemonbot #1

Closed chisp2000 closed 8 years ago

chisp2000 commented 8 years ago

Traceback (most recent call last):

File "run_lemon_bot.py", line 32, in <module> import discord File "/home/dionysus/Documents/DiscBot/discord/__init__.py", line 20, in <module> from .client import Client, AppInfo, ChannelPermissions File "/home/dionysus/Documents/DiscBot/discord/client.py", line 134 def __init__(self, *, loop=None, **options): ^ SyntaxError: invalid syntax

The thing is I've checked your installation guide, and it seems that I was missing discord when I checked what modules I had using help('modules') in python shell. But when I try installing discord using pip install discord it won't work. Rapptz guide tells me that I should use pip3 to install it, so I did. It worked fine, but lemon bot still won't run.

lemon65 commented 8 years ago

I was talking with another user about this issue and I think that I typed up the READMe missing a small part, when I run my pip command I include ".py" at the end to install discord. This should install the older version that is using python 2.7.

Try the Command -- pip install discord.py

Requirement already satisfied (use --upgrade to upgrade): discord.py in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): ws4py>=0.3.4 in /usr/local/lib/python2.7/dist-packages (from discord.py) Requirement already satisfied (use --upgrade to upgrade): requests>=2.7.0 in /usr/local/lib/python2.7/dist-packages (from discord.py) Cleaning up...

lemon65 commented 8 years ago

Note - Changed the README.md to include "discord.py"

chisp2000 commented 8 years ago

Got this error:

Collecting discord.py Using cached discord.py-0.11.0.zip Collecting aiohttp<0.22.0,>=0.21.0 (from discord.py) Using cached aiohttp-0.21.6.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-cfISLa/aiohttp/setup.py", line 61, in <module> raise RuntimeError("aiohttp requires Python 3.4.1+") RuntimeError: aiohttp requires Python 3.4.1+

---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cfISLa/aiohttp/

Seems like it conflicts with aoihttp.

chisp2000 commented 8 years ago

Should I maybe try just deleting aoihttp?

lemon65 commented 8 years ago

ya that might be a good place to start it might be causing your issues, sorry for the later reply, the wife just had a baby so I was up really late last night.

lemon65 commented 8 years ago

Let me know if that resolves the issue.

chisp2000 commented 8 years ago

When I executed pip uninstall aoihttp I got this message:

Cannot uninstall requirement aoihttp, not installed Same thing when I try with pip3.

So I tried pip3 install aoihttp and got this.

Collecting aoihttp Could not find a version that satisfies the requirement aoihttp (from versions: ) No matching distribution found for aoihttp

Same thing with pip.

lemon65 commented 8 years ago

What os are you using ? What is your environment like?

chisp2000 commented 8 years ago

Linux. Voyager OS, with xfce.

lemon65 commented 8 years ago

i'm not sure on this one man, my code is designed for dicord.py for python 2.7 and I can install that version with the command "pip install discord.py".

chisp2000 commented 8 years ago

I'll try on another computer sometime, thank you for your time! And good luck with the baby :)!

lemon65 commented 8 years ago

ya sorry I can't help you out, thanks hes doing really well!

PapyrusThePlant commented 8 years ago

Fyi the pypi package has been updated around a month and half ago and is no longer compatible with anything less than python 3.4

lemon65 commented 8 years ago

I agree with that, but you should be able to get an older version of the discord lib that is compatible. At least in till I find the time to update and test using python3

lemon65 commented 8 years ago

That is if people want me to update this project

chisp2000 commented 8 years ago

I would adore you if you did.

PapyrusThePlant commented 8 years ago

You can install older version of a package with pip like so: $ pip install PackageName==FullVersionNumber

But concerning discord, the last version of the lib compatible with python 2 is likely to be broken due to the changes in discord's API itself.

lemon65 commented 8 years ago

do you know when they pushed the breaking changes to the discord API ?

lemon65 commented 8 years ago

Created the ticket -- https://github.com/lemon65/lemon_bot_discord/issues/2

PapyrusThePlant commented 8 years ago

I don't, but the last python 2 compatible version of discord.py is pretty old. Async brings very cool possibilities anyway.

lemon65 commented 8 years ago

Well I created the ticket and I'm shooting for aug 31st . I'll look into it tonight after work. Un-till then users can use the older version of discord and still be able to use lemon bot.