Closed ViMichy closed 7 years ago
What version of python are you using? Discord Werewolf requires at least Python 3.5
python 3.6.1
Try python3 -V. If that gives you Python 3.6.1, use python3 bot.py
instead of python bot.py
It gives me this: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 808, in init self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bot.py", line 50, in
Looks like a SSL error O.o Try commenting out the following block of code in the file (lines 49 to 53 inclusive)
url = "https://raw.githubusercontent.com/belguawhale/Discord-Werewolf/master/lang/" + MESSAGE_LANGUAGE + ".json"
lang = get_jsonparsed_data(url)
if not lang:
print("Could not find language {}, fallback on en".format(MESSAGE_LANGUAGE))
lang = get_jsonparsed_data("https://raw.githubusercontent.com/belguawhale/Discord-Werewolf/master/lang/en.json")```
now it gives this: BACKING UP SETTINGS Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 601, in _create_direct_connection local_addr=self._local_addr) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 802, in create_connection sock, protocol_factory, ssl, server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 828, in _create_connection_transport yield from waiter File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 503, in data_received ssldata, appdata = self._sslpipe.feed_ssldata(data) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 304, in connect yield from self._create_connection(req) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 578, in _create_connection transport, proto = yield from self._create_direct_connection(req) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 624, in _create_direct_connection (req.host, req.port, exc.strerror)) from exc aiohttp.errors.ClientOSError: [Errno 1] Can not connect to discordapp.com:443 [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "bot.py", line 2885, in
Try updating the dependencies using the following commands:
python3 -m pip install -U aiohttp
python3 -m pip install -U asyncio
python3 -m pip install -U discord.py
still gives me the same error
There appears to be an error with SSL cerificates on Mac on Python 3.6. Try double-clocking the file located at /Applications/Python 3.6/Install Certificates.command
now it gives this: BACKING UP SETTINGS Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/http.py", line 256, in static_login data = yield from self.request(Route('GET', '/users/@me')) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/http.py", line 198, in request raise HTTPException(r, data) discord.errors.HTTPException: UNAUTHORIZED (status code: 401): 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "bot.py", line 2885, in
Are you sure you are using the correct token? You can get it by going to https://discordapp.com/developers/applications/me, clicking on the bot application, and clicking Reveal Token
am i supposed to put the token with the ' or without it. either way it gives an error
Put the token under config.py so the line reads something like
TOKEN = 'insert token here'
Ignoring exception in on_ready Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event yield from getattr(self, event)(*args, **kwargs) File "bot.py", line 74, in on_ready await log(1, 'on_ready triggered!') File "bot.py", line 1697, in log await client.send_message(client.get_channel(DEBUG_CHANNEL), logmsg) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/client.py", line 1145, in send_message channel_id, guild_id = yield from self._resolve_destination(destination) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/client.py", line 289, in _resolve_destination raise InvalidArgument(fmt.format(destination)) discord.errors.InvalidArgument: Destination must be Channel, PrivateChannel, User, or Object. Received NoneType
Did you put the debug channel's ID into config.py as a string?
?? the only thing i changed in the config.py was putting the token
Put the server's id, lobby channel's id, and the debug channel's id into config.py in their respective locations
it opens in discord. do i have to put something on the PLAYERS_ROLE_NAME = 'Players' ADMINS_ROLE_NAME = 'Admins' also there is a: [WARNING] Could not find Werewolf Notify role Werewolf Notify
GAME_CHANNEL = '255518237356195840'
DEBUG_CHANNEL = '255531567936569344'
WEREWOLF_SERVER = '255517530783875073'
It should look something like this
that part works but it gives me on discord: [INFO] on_ready triggered! [ERROR] @ViMichy Could not find players role Players [ERROR] @ViMichy Could not find admins role Admins [WARNING] Could not find Werewolf Notify role Werewolf Notify
Did you create a Players role and an Admins role?
i just did. now it gives me this: [INFO] on_ready triggered! [DEBUG] Players role id: 298198243958063126 [DEBUG] Admins role id: 295958905794854914 [WARNING] Could not find Werewolf Notify role Werewolf Notify
The last one is fine; you can safely ignore it. If you wish, you can create a werewolf notify role though
what does that do and how do i do it?
The Werewolf Notify role is an outdated way to notify people to join the game; !notify works much better
Anyways I'm closing the issue now since it has been resolved. Please pm me on discord if you have any more questions (you can join the official werewolf server using the link in the repository description)
Looks like a SSL error O.o
In which file sir
when I type the "python bot.py" this message appear File "bot.py", line 69 async def on_ready(): ^ SyntaxError: invalid syntax
I'm on mac if it has something to do with it