Closed Frozenka closed 6 months ago
16:51:25 - discord.client WARNING: PyNaCl is not installed, voice will NOT be supported
16:51:26 - main INFO: Starting bot & webhook server INFO: Started server process [14370] INFO: Waiting for application startup. 16:51:26 - discord.client INFO: logging in using static token INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:1337 (Press CTRL+C to quit) 16:51:28 - src.bot INFO: Started bot as Hackster#8721 (ID: 1128287330088788000) Loading ScheduledTasks cog... ScheduledTasks cog loaded! 16:52:18 - asyncio ERROR: Task exception was never retrieved future: <Task finished name='pycord: on_application_command' coro=<Client._run_event() done, defined at /root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py:370> exception=AttributeError("'NoneType' object has no attribute 'send'")> Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py", line 383, in _run_event await self.on_error(event_name, *args, *kwargs) File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py", line 378, in _run_event await coro(args, **kwargs) File "/hackster/hackster/src/bot.py", line 84, in on_application_command await ctx.guild.get_channel(settings.channels.BOT_LOGS).send(embed=embed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'send' 16:52:19 - src.helpers.verification ERROR: Non-OK HTTP status code returned from identifier lookup: 401.
@Frozenka please excuse us for not responding earlier. You will find all the required migrations under alembic/versions
folder. Also, you can find a .test.env
that you can use in order to assign the correct environmental variables.
Let me know if you have any issues or questions.
Describe the bug
Hello to you, I installed hackster on my VPS to make it run on my discord, I have however a problem, I lack many tables for the DB (I created the first ones for the api to launch) do you have a list of Tables or installation sheet?thank you very much
To reproduce
(Background on this error at: https://sqlalche.me/e/20/f405) 15:43:31 - asyncio ERROR: Task exception was never retrieved future: <Task finished name='pycord: on_message' coro=<Client._run_event() done, defined at /root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py:370> exception=ProgrammingError('(asyncmy.errors.ProgrammingError) (1146, "Table \'bot_dev.htb_discord_link\' doesn\'t exist")')> Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 920, in doexecute cursor.execute(statement, parameters) File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/asyncmy.py", line 95, in execute return self.await(self._execute_async(operation, parameters)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 126, in await_only return current.driver.switch(awaitable) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 187, in greenlet_spawn value = await result ^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/asyncmy.py", line 107, in _execute_async result = await self._cursor.execute(operation, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "asyncmy/cursors.pyx", line 179, in execute File "asyncmy/cursors.pyx", line 364, in _query File "asyncmy/connection.pyx", line 450, in query File "asyncmy/connection.pyx", line 638, in _read_query_result File "asyncmy/connection.pyx", line 1025, in read File "asyncmy/connection.pyx", line 600, in read_packet File "asyncmy/protocol.pyx", line 190, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/protocol.pyx", line 194, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/errors.pyx", line 128, in asyncmy.errors.raise_mysql_exception File "asyncmy/errors.pyx", line 137, in asyncmy.errors.raise_mysql_exception asyncmy.errors.ProgrammingError: (1146, "Table 'bot_dev.htb_discord_link' doesn't exist")
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py", line 383, in _run_event await self.on_error(event_name, *args, *kwargs) File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py", line 378, in _run_event await coro(args, *kwargs) File "/hackster/hackster/src/cmds/automation/auto_verify.py", line 57, in on_message await self.process_reverification(ctx.author) File "/hackster/hackster/src/cmds/automation/auto_verify.py", line 30, in process_reverification result = await session.scalars(stmt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 553, in scalars result = await self.execute( ^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 435, in execute result = await greenlet_spawn( ^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 192, in greenlet_spawn result = context.throw(sys.exc_info()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2232, in execute return self._execute_internal( ^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2127, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/orm/context.py", line 292, in orm_execute_statement result = conn.execute( ^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1413, in execute return meth( ^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection return connection._execute_clauseelement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1637, in _execute_clauseelement ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1841, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context self._handle_dbapi_exception( File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context self.dialect.do_execute( File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 920, in doexecute cursor.execute(statement, parameters) File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/asyncmy.py", line 95, in execute return self.await(self._execute_async(operation, parameters)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 126, in await_only return current.driver.switch(awaitable) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 187, in greenlet_spawn value = await result ^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/asyncmy.py", line 107, in _execute_async result = await self._cursor.execute(operation, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "asyncmy/cursors.pyx", line 179, in execute File "asyncmy/cursors.pyx", line 364, in _query File "asyncmy/connection.pyx", line 450, in query File "asyncmy/connection.pyx", line 638, in _read_query_result File "asyncmy/connection.pyx", line 1025, in read File "asyncmy/connection.pyx", line 600, in read_packet File "asyncmy/protocol.pyx", line 190, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/protocol.pyx", line 194, in asyncmy.protocol.MysqlPacket.raise_for_error File "asyncmy/errors.pyx", line 128, in asyncmy.errors.raise_mysql_exception File "asyncmy/errors.pyx", line 137, in asyncmy.errors.raise_mysql_exception sqlalchemy.exc.ProgrammingError: (asyncmy.errors.ProgrammingError) (1146, "Table 'bot_dev.htb_discord_link' doesn't exist") [SQL: SELECT htb_discord_link.id, htb_discord_link.account_identifier, htb_discord_link.discord_user_id, htb_discord_link.htb_user_id FROM htb_discord_link WHERE htb_discord_link.discord_user_id = %s ORDER BY htb_discord_link.id LIMIT %s] [parameters: (1048313568199704616, 1)] (Background on this error at: https://sqlalche.me/e/20/f405)
Expected behavior
└─# poetry run task start 14:51:28 - discord.client WARNING: PyNaCl is not installed, voice will NOT be supported 14:51:28 - main INFO: Starting bot & webhook server INFO: Started server process [9326] INFO: Waiting for application startup. 14:51:28 - discord.client INFO: logging in using static token INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:1337 (Press CTRL+C to quit) 14:51:31 - src.bot INFO: Started bot as Hckster#8721 (ID: 1128287330088788000) Loading ScheduledTasks cog... ScheduledTasks cog loaded! 14:52:37 - asyncio ERROR: Task exception was never retrieved future: <Task finished name='pycord: on_application_command' coro=<Client._run_event() done, defined at /root/.cache/pypoetry/virtualenvs/hackster-jqLlKwl8-py3.11/lib/python3.11/site-packages/discord/client.py:370> exception=AttributeError("'NoneType' object has no attribute 'send'")>
Relevant log output
No response
Additional context