GalaticSoftware / CryptoSentinel

CryptoSentinel is a Telegram bot that provides users with cryptocurrency-related information, market trends, news, and open trading positions
1 stars 0 forks source link

User Bug #65

Closed AccursedGalaxy closed 11 months ago

AccursedGalaxy commented 11 months ago

2023-09-28T20:27:25.504805+00:00 app[worker.1]: 2023-09-28 20:27:25,504 - root - INFO - Received message: /start 2023-09-28T20:27:25.505472+00:00 app[worker.1]: 2023-09-28 20:27:25,505 - root - INFO - Update published to RabbitMQ 2023-09-28T20:27:25.506567+00:00 app[bot.1]: 2023-09-28 20:27:25,506 - root - INFO - Processing update: {'message': {'chat': {'last_name': 'CRO', 'username': 'KMB_CRO', 'type': 'private', 'first_name': 'KMB', 'id': 5208257233}, 'message_id': 5013, 'supergroup_chat_created': False, 'entities': [{'offset': 0, 'type': 'bot_command', 'length': 6}], 'new_chat_members': [], 'new_chat_photo': [], 'photo': [], 'delete_chat_photo': False, 'caption_entities': [], 'text': '/start', 'date': 1695932845, 'group_chat_created': False, 'channel_chat_created': False, 'from': {'last_name': 'CRO', 'is_bot': False, 'username': 'KMB_CRO', 'first_name': 'KMB', 'language_code': 'en', 'id': 5208257233}}, 'update_id': 867500608} 2023-09-28T20:27:25.513698+00:00 app[bot.1]: 2023-09-28 20:27:25,513 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception. 2023-09-28T20:27:25.513699+00:00 app[bot.1]: Traceback (most recent call last): 2023-09-28T20:27:25.513699+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context 2023-09-28T20:27:25.513700+00:00 app[bot.1]: self.dialect.do_execute( 2023-09-28T20:27:25.513703+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 920, in do_execute 2023-09-28T20:27:25.513703+00:00 app[bot.1]: cursor.execute(statement, parameters) 2023-09-28T20:27:25.513705+00:00 app[bot.1]: psycopg2.errors.NumericValueOutOfRange: integer out of range 2023-09-28T20:27:25.513705+00:00 app[bot.1]: 2023-09-28T20:27:25.513705+00:00 app[bot.1]: 2023-09-28T20:27:25.513706+00:00 app[bot.1]: The above exception was the direct cause of the following exception: 2023-09-28T20:27:25.513706+00:00 app[bot.1]: 2023-09-28T20:27:25.513707+00:00 app[bot.1]: Traceback (most recent call last): 2023-09-28T20:27:25.513707+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/dispatcher.py", line 555, in process_update 2023-09-28T20:27:25.513707+00:00 app[bot.1]: handler.handle_update(update, self, check, context) 2023-09-28T20:27:25.513707+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/handler.py", line 198, in handle_update 2023-09-28T20:27:25.513707+00:00 app[bot.1]: return self.callback(update, context) 2023-09-28T20:27:25.513707+00:00 app[bot.1]: File "/app/bot/handlers/start.py", line 17, in start 2023-09-28T20:27:25.513707+00:00 app[bot.1]: user = get_or_create_user(user_id, username) 2023-09-28T20:27:25.513708+00:00 app[bot.1]: File "/app/users/management.py", line 31, in get_or_create_user 2023-09-28T20:27:25.513708+00:00 app[bot.1]: session.commit() 2023-09-28T20:27:25.513708+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1906, in commit 2023-09-28T20:27:25.513708+00:00 app[bot.1]: trans.commit(_to_root=True) 2023-09-28T20:27:25.513708+00:00 app[bot.1]: File "", line 2, in commit 2023-09-28T20:27:25.513709+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go 2023-09-28T20:27:25.513709+00:00 app[bot.1]: ret_value = fn(self, *arg, kw) 2023-09-28T20:27:25.513709+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1221, in commit 2023-09-28T20:27:25.513709+00:00 app[bot.1]: self._prepare_impl() 2023-09-28T20:27:25.513709+00:00 app[bot.1]: File "", line 2, in _prepare_impl 2023-09-28T20:27:25.513709+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go 2023-09-28T20:27:25.513709+00:00 app[bot.1]: ret_value = fn(self, *arg, **kw) 2023-09-28T20:27:25.513709+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1196, in _prepare_impl 2023-09-28T20:27:25.513709+00:00 app[bot.1]: self.session.flush() 2023-09-28T20:27:25.513710+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4154, in flush 2023-09-28T20:27:25.513710+00:00 app[bot.1]: self._flush(objects) 2023-09-28T20:27:25.513710+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4291, in _flush 2023-09-28T20:27:25.513710+00:00 app[bot.1]: transaction.rollback(_capture_exception=True) 2023-09-28T20:27:25.513710+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 147, in exit 2023-09-28T20:27:25.513710+00:00 app[bot.1]: raise exc_value.with_traceback(exc_tb) 2023-09-28T20:27:25.513710+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4251, in _flush 2023-09-28T20:27:25.513710+00:00 app[bot.1]: flush_context.execute() 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 467, in execute 2023-09-28T20:27:25.513711+00:00 app[bot.1]: rec.execute(self) 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 644, in execute 2023-09-28T20:27:25.513711+00:00 app[bot.1]: util.preloaded.orm_persistence.save_obj( 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 93, in save_obj 2023-09-28T20:27:25.513711+00:00 app[bot.1]: _emit_insert_statements( 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 1223, in _emit_insert_statements 2023-09-28T20:27:25.513711+00:00 app[bot.1]: result = connection.execute( 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1413, in execute 2023-09-28T20:27:25.513711+00:00 app[bot.1]: return meth( 2023-09-28T20:27:25.513711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection 2023-09-28T20:27:25.513712+00:00 app[bot.1]: return connection._execute_clauseelement( 2023-09-28T20:27:25.513712+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1637, in _execute_clauseelement 2023-09-28T20:27:25.513712+00:00 app[bot.1]: ret = self._execute_context( 2023-09-28T20:27:25.513712+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1841, in _execute_context 2023-09-28T20:27:25.513712+00:00 app[bot.1]: return self._exec_single_context( 2023-09-28T20:27:25.513712+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context 2023-09-28T20:27:25.513712+00:00 app[bot.1]: self._handle_dbapi_exception( 2023-09-28T20:27:25.513712+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception 2023-09-28T20:27:25.513712+00:00 app[bot.1]: raise sqlalchemy_exception.with_traceback(exc_info[2]) from e 2023-09-28T20:27:25.513716+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context 2023-09-28T20:27:25.513716+00:00 app[bot.1]: self.dialect.do_execute( 2023-09-28T20:27:25.513717+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 920, in do_execute 2023-09-28T20:27:25.513717+00:00 app[bot.1]: cursor.execute(statement, parameters) 2023-09-28T20:27:25.513717+00:00 app[bot.1]: sqlalchemy.exc.DataError: (psycopg2.errors.NumericValueOutOfRange) integer out of range 2023-09-28T20:27:25.513718+00:00 app[bot.1]: 2023-09-28T20:27:25.513720+00:00 app[bot.1]: [SQL: INSERT INTO users (telegram_id, username, has_access, subscription_end, subscription_type, referrer_id, used_referral_code) VALUES (%(telegram_id)s, %(username)s, %(has_access)s, %(subscription_end)s, %(subscription_type)s, %(referrer_id)s, %(used_referral_code)s) RETURNING users.id] 2023-09-28T20:27:25.513721+00:00 app[bot.1]: [parameters: {'telegram_id': 5208257233, 'username': 'KMB_CRO', 'has_access': False, 'subscription_end': None, 'subscription_type': None, 'referrer_id': None, 'used_referral_code': 'no'}] 2023-09-28T20:27:25.513722+00:00 app[bot.1]: (Background on this error at: https://sqlalche.me/e/20/9h9h) 2023-09-28T20:28:39.828617+00:00 app[worker.1]: 2023-09-28 20:28:39,828 - root - INFO - Received message: /use_token c7bd2852-5c6b-469c-8e1e-17f09e0718ad 2023-09-28T20:28:39.829559+00:00 app[worker.1]: 2023-09-28 20:28:39,829 - root - INFO - Update published to RabbitMQ 2023-09-28T20:28:39.830567+00:00 app[bot.1]: 2023-09-28 20:28:39,830 - root - INFO - Processing update: {'message': {'chat': {'last_name': 'CRO', 'username': 'KMB_CRO', 'type': 'private', 'first_name': 'KMB', 'id': 5208257233}, 'message_id': 5014, 'supergroup_chat_created': False, 'entities': [{'offset': 0, 'type': 'bot_command', 'length': 10}], 'new_chat_members': [], 'new_chat_photo': [], 'photo': [], 'delete_chat_photo': False, 'caption_entities': [], 'text': '/use_token c7bd2852-5c6b-469c-8e1e-17f09e0718ad', 'date': 1695932919, 'group_chat_created': False, 'channel_chat_created': False, 'from': {'last_name': 'CRO', 'is_bot': False, 'username': 'KMB_CRO', 'first_name': 'KMB', 'language_code': 'en', 'id': 5208257233}}, 'update_id': 867500609} 2023-09-28T20:28:39.835397+00:00 app[bot.1]: 2023-09-28 20:28:39,835 - bot.handlers.free.use_token - INFO - Inside condition: existing_token.used = False 2023-09-28T20:28:39.840705+00:00 app[bot.1]: 2023-09-28 20:28:39,840 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception. 2023-09-28T20:28:39.840706+00:00 app[bot.1]: Traceback (most recent call last): 2023-09-28T20:28:39.840706+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context 2023-09-28T20:28:39.840707+00:00 app[bot.1]: self.dialect.do_execute( 2023-09-28T20:28:39.840707+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 920, in do_execute 2023-09-28T20:28:39.840707+00:00 app[bot.1]: cursor.execute(statement, parameters) 2023-09-28T20:28:39.840709+00:00 app[bot.1]: psycopg2.errors.NumericValueOutOfRange: integer out of range 2023-09-28T20:28:39.840709+00:00 app[bot.1]: 2023-09-28T20:28:39.840709+00:00 app[bot.1]: 2023-09-28T20:28:39.840710+00:00 app[bot.1]: The above exception was the direct cause of the following exception: 2023-09-28T20:28:39.840710+00:00 app[bot.1]: 2023-09-28T20:28:39.840710+00:00 app[bot.1]: Traceback (most recent call last): 2023-09-28T20:28:39.840710+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/dispatcher.py", line 555, in process_update 2023-09-28T20:28:39.840711+00:00 app[bot.1]: handler.handle_update(update, self, check, context) 2023-09-28T20:28:39.840711+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/handler.py", line 198, in handle_update 2023-09-28T20:28:39.840711+00:00 app[bot.1]: return self.callback(update, context) 2023-09-28T20:28:39.840711+00:00 app[bot.1]: File "/app/bot/handlers/free/use_token.py", line 48, in use_token 2023-09-28T20:28:39.840712+00:00 app[bot.1]: session.commit() 2023-09-28T20:28:39.840712+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1906, in commit 2023-09-28T20:28:39.840712+00:00 app[bot.1]: trans.commit(_to_root=True) 2023-09-28T20:28:39.840712+00:00 app[bot.1]: File "", line 2, in commit 2023-09-28T20:28:39.840713+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go 2023-09-28T20:28:39.840713+00:00 app[bot.1]: ret_value = fn(self, *arg, kw) 2023-09-28T20:28:39.840713+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1221, in commit 2023-09-28T20:28:39.840713+00:00 app[bot.1]: self._prepare_impl() 2023-09-28T20:28:39.840713+00:00 app[bot.1]: File "", line 2, in _prepare_impl 2023-09-28T20:28:39.840714+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 137, in _go 2023-09-28T20:28:39.840714+00:00 app[bot.1]: ret_value = fn(self, *arg, **kw) 2023-09-28T20:28:39.840714+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1196, in _prepare_impl 2023-09-28T20:28:39.840714+00:00 app[bot.1]: self.session.flush() 2023-09-28T20:28:39.840714+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4154, in flush 2023-09-28T20:28:39.840714+00:00 app[bot.1]: self._flush(objects) 2023-09-28T20:28:39.840714+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4291, in _flush 2023-09-28T20:28:39.840715+00:00 app[bot.1]: transaction.rollback(_capture_exception=True) 2023-09-28T20:28:39.840715+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 147, in exit 2023-09-28T20:28:39.840715+00:00 app[bot.1]: raise exc_value.with_traceback(exc_tb) 2023-09-28T20:28:39.840715+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 4251, in _flush 2023-09-28T20:28:39.840715+00:00 app[bot.1]: flush_context.execute() 2023-09-28T20:28:39.840715+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 467, in execute 2023-09-28T20:28:39.840715+00:00 app[bot.1]: rec.execute(self) 2023-09-28T20:28:39.840715+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 644, in execute 2023-09-28T20:28:39.840715+00:00 app[bot.1]: util.preloaded.orm_persistence.save_obj( 2023-09-28T20:28:39.840716+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 93, in save_obj 2023-09-28T20:28:39.840716+00:00 app[bot.1]: _emit_insert_statements( 2023-09-28T20:28:39.840716+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 1223, in _emit_insert_statements 2023-09-28T20:28:39.840716+00:00 app[bot.1]: result = connection.execute( 2023-09-28T20:28:39.840716+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1413, in execute 2023-09-28T20:28:39.840716+00:00 app[bot.1]: return meth( 2023-09-28T20:28:39.840717+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection 2023-09-28T20:28:39.840717+00:00 app[bot.1]: return connection._execute_clauseelement( 2023-09-28T20:28:39.840717+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1637, in _execute_clauseelement 2023-09-28T20:28:39.840717+00:00 app[bot.1]: ret = self._execute_context( 2023-09-28T20:28:39.840717+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1841, in _execute_context 2023-09-28T20:28:39.840717+00:00 app[bot.1]: return self._exec_single_context( 2023-09-28T20:28:39.840717+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1982, in _exec_single_context 2023-09-28T20:28:39.840717+00:00 app[bot.1]: self._handle_dbapi_exception( 2023-09-28T20:28:39.840718+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception 2023-09-28T20:28:39.840718+00:00 app[bot.1]: raise sqlalchemy_exception.with_traceback(exc_info[2]) from e 2023-09-28T20:28:39.840718+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1963, in _exec_single_context 2023-09-28T20:28:39.840718+00:00 app[bot.1]: self.dialect.do_execute( 2023-09-28T20:28:39.840721+00:00 app[bot.1]: File "/app/.heroku/python/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 920, in do_execute 2023-09-28T20:28:39.840721+00:00 app[bot.1]: cursor.execute(statement, parameters) 2023-09-28T20:28:39.840722+00:00 app[bot.1]: sqlalchemy.exc.DataError: (psycopg2.errors.NumericValueOutOfRange) integer out of range 2023-09-28T20:28:39.840722+00:00 app[bot.1]: 2023-09-28T20:28:39.840724+00:00 app[bot.1]: [SQL: INSERT INTO users (telegram_id, username, has_access, subscription_end, subscription_type, referrer_id, used_referral_code) VALUES (%(telegram_id)s, %(username)s, %(has_access)s, %(subscription_end)s, %(subscription_type)s, %(referrer_id)s, %(used_referral_code)s) RETURNING users.id] 2023-09-28T20:28:39.840725+00:00 app[bot.1]: [parameters: {'telegram_id': 5208257233, 'username': 'KMB_CRO', 'has_access': False, 'subscription_end': None, 'subscription_type': None, 'referrer_id': None, 'used_referral_code': 'no'}]

AccursedGalaxy commented 11 months ago

fixed. with change to BigInteger