run.sh instantly fails
cadmiumsky opened this issue · 4 comments
Hello, I recently installed the bot on a machine that runs Archlinux, but it wont compile, and I do not understand why. This is the output it gives me when I try to run it:
Already up to date.
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing pygobject (3.38.0)
Installing the current project: TLE (0.1.0)
ujson module not found, using json
msgpack not installed, MsgPackSerializer unavailable
21-07-2021 22:18:15:WARNING:discord.client:PyNaCl is not installed, voice will NOT be supported
21-07-2021 22:18:15:INFO:root:Cogs loaded: Codeforces, Handles, Starboard, Graphs, Dueling, Contests, Meta, Logging, CSES, CacheControl
21-07-2021 22:18:15:INFO:discord.client:logging in using static token
21-07-2021 22:18:16:INFO:discord.gateway:Shard ID None has sent the IDENTIFY payload.
21-07-2021 22:18:16:INFO:discord.gateway:Websocket closed with 4014, cannot reconnect.
21-07-2021 22:18:16:INFO:discord.client:Cleaning up tasks.
21-07-2021 22:18:16:INFO:discord.client:Closing the event loop.
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/mihai/TLE/tle/__main__.py", line 91, in <module>
main()
File "/home/mihai/TLE/tle/__main__.py", line 87, in main
bot.run(token)
File "/root/.cache/pypoetry/virtualenvs/tle-OSx6iSyO-py3.9/lib/python3.9/site-packages/discord/client.py", line 708, in run
return future.result()
File "/root/.cache/pypoetry/virtualenvs/tle-OSx6iSyO-py3.9/lib/python3.9/site-packages/discord/client.py", line 687, in runner
await self.start(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/tle-OSx6iSyO-py3.9/lib/python3.9/site-packages/discord/client.py", line 651, in start
await self.connect(reconnect=reconnect)
File "/root/.cache/pypoetry/virtualenvs/tle-OSx6iSyO-py3.9/lib/python3.9/site-packages/discord/client.py", line 586, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
21-07-2021 22:18:17:ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7ff6c8eeed00>
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.9/logging/handlers.py", line 75, in emit
logging.FileHandler.emit(self, record)
File "/usr/lib/python3.9/logging/__init__.py", line 1186, in emit
self.stream = self._open()
File "/usr/lib/python3.9/logging/__init__.py", line 1175, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding,
NameError: name 'open' is not defined
Call stack:
File "/root/.cache/pypoetry/virtualenvs/tle-OSx6iSyO-py3.9/lib/python3.9/site-packages/aiohttp/client.py", line 314, in __del__
self._loop.call_exception_handler(context)
File "/usr/lib/python3.9/asyncio/base_events.py", line 1764, in call_exception_handler
self.default_exception_handler(context)
File "/usr/lib/python3.9/asyncio/base_events.py", line 1738, in default_exception_handler
logger.error('\n'.join(log_lines), exc_info=exc_info)
Message: 'Unclosed client session\nclient_session: <aiohttp.client.ClientSession object at 0x7ff6c8eeed00>'
Arguments: ()
I tried installing the things it says it doesn't find (such as pynacl), and I did, but it didn't recognize the ones I installed (and I do not how to do otherwise). I also tried running it with and without sudo, but the result was practically the same.
Could you please help me?
Did you find solution to this error?? I m facing the same issue
Skim through the error message?
Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page.
The first few commands means you need to run some of the ;cache
commands to populate the rating change and problemset caches.
The warning about contest authors isn't that important, though you can generate that json file if you really want to by running the script at extra/scrape_cf_contest_writers.py
.
The last one with CSES is expected after they changed the way their website works. We will probably end up disabling that cog at some point until CSES gives us a proper api to use.