ломается бот при попытке логгирования #11

Open
opened 2024-03-19 14:12:03 +10:00 by hogweed1 · 0 comments
Owner

Traceback (most recent call last):

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
AttributeError: 'list' object has no attribute 'items'

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
for k, v in d.items():

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
self.handle(record)

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 20, in remake_field_generator

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 1430, in debug

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates.

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
for id_val in remake_field_generator(v):

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 26, in filter_grammar_messages

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
log.debug('Response for %s: [%d] "%r"', method_name, status_code, body)

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 140, in make_request

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 110, in get_updates

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 1594, in handle

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 11, in remake_field_generator

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
for id_val in remake_field_generator(k2):

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
updates = await self.bot.get_updates(

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 804, in filter

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
self._log(DEBUG, msg, args, **kwargs)

2024-03-19 14:03:51.949 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 95, in check_result

2024-03-19 14:03:51.463 systemd-journaljack_bot.service
DEBUG:aiogram:Make request: "getUpdates" with data: "{'offset': 942587398, 'timeout': 20}" and files "None"

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
result = f(record) # assume callable - will raise if not

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/base.py", line 236, in request

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 1585, in _log

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 20, in remake_field_generator

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates.

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
log.debug('Response for %s: [%d] "%r"', method_name, status_code, body)

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 382, in start_polling

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
result = await self.request(api.Methods.GET_UPDATES, payload)

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
self.handle(record)

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
if (not self.disabled) and self.filter(record):

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
AttributeError: 'list' object has no attribute 'items'

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 110, in get_updates

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
for _ in remake_field_generator(j):

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
Traceback (most recent call last):

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
for id_val in remake_field_generator(v):

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 95, in check_result

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
for id_val in remake_field_generator(k2):

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 1594, in handle

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
updates = await self.bot.get_updates(

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 17, in remake_field_generator

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
self._log(DEBUG, msg, args, **kwargs)

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
for k, v in d.items():

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 11, in remake_field_generator

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 1430, in debug

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 140, in make_request

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/share/python_bot/bot.py", line 26, in filter_grammar_messages

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
File "/usr/lib/python3.9/logging/init.py", line 804, in filter

2024-03-19 14:03:46.461 systemd-journaljack_bot.service
return check_result(method, response.content_type, response.status, await response.text())

Traceback (most recent call last): 2024-03-19 14:03:51.949 systemd-journaljack_bot.service AttributeError: 'list' object has no attribute 'items' 2024-03-19 14:03:51.949 systemd-journaljack_bot.service for k, v in d.items(): 2024-03-19 14:03:51.949 systemd-journaljack_bot.service self.handle(record) 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 20, in remake_field_generator 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 1430, in debug 2024-03-19 14:03:51.949 systemd-journaljack_bot.service ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates. 2024-03-19 14:03:51.949 systemd-journaljack_bot.service for id_val in remake_field_generator(v): 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 26, in filter_grammar_messages 2024-03-19 14:03:51.949 systemd-journaljack_bot.service log.debug('Response for %s: [%d] "%r"', method_name, status_code, body) 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 140, in make_request 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 110, in get_updates 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 1594, in handle 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 11, in remake_field_generator 2024-03-19 14:03:51.949 systemd-journaljack_bot.service return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files, 2024-03-19 14:03:51.949 systemd-journaljack_bot.service for id_val in remake_field_generator(k2): 2024-03-19 14:03:51.949 systemd-journaljack_bot.service updates = await self.bot.get_updates( 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 804, in filter 2024-03-19 14:03:51.949 systemd-journaljack_bot.service self._log(DEBUG, msg, args, **kwargs) 2024-03-19 14:03:51.949 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 95, in check_result 2024-03-19 14:03:51.463 systemd-journaljack_bot.service DEBUG:aiogram:Make request: "getUpdates" with data: "{'offset': 942587398, 'timeout': 20}" and files "None" 2024-03-19 14:03:46.461 systemd-journaljack_bot.service return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files, 2024-03-19 14:03:46.461 systemd-journaljack_bot.service result = f(record) # assume callable - will raise if not 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/base.py", line 236, in request 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 1585, in _log 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 20, in remake_field_generator 2024-03-19 14:03:46.461 systemd-journaljack_bot.service ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates. 2024-03-19 14:03:46.461 systemd-journaljack_bot.service log.debug('Response for %s: [%d] "%r"', method_name, status_code, body) 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 382, in start_polling 2024-03-19 14:03:46.461 systemd-journaljack_bot.service result = await self.request(api.Methods.GET_UPDATES, payload) 2024-03-19 14:03:46.461 systemd-journaljack_bot.service self.handle(record) 2024-03-19 14:03:46.461 systemd-journaljack_bot.service if (not self.disabled) and self.filter(record): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service AttributeError: 'list' object has no attribute 'items' 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 110, in get_updates 2024-03-19 14:03:46.461 systemd-journaljack_bot.service for _ in remake_field_generator(j): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service Traceback (most recent call last): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service for id_val in remake_field_generator(v): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 95, in check_result 2024-03-19 14:03:46.461 systemd-journaljack_bot.service for id_val in remake_field_generator(k2): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 1594, in handle 2024-03-19 14:03:46.461 systemd-journaljack_bot.service updates = await self.bot.get_updates( 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 17, in remake_field_generator 2024-03-19 14:03:46.461 systemd-journaljack_bot.service self._log(DEBUG, msg, args, **kwargs) 2024-03-19 14:03:46.461 systemd-journaljack_bot.service for k, v in d.items(): 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 11, in remake_field_generator 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 1430, in debug 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/home/jack/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 140, in make_request 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/share/python_bot/bot.py", line 26, in filter_grammar_messages 2024-03-19 14:03:46.461 systemd-journaljack_bot.service File "/usr/lib/python3.9/logging/__init__.py", line 804, in filter 2024-03-19 14:03:46.461 systemd-journaljack_bot.service return check_result(method, response.content_type, response.status, await response.text())
hogweed1 referenced this issue from a commit 2024-03-19 14:12:22 +10:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Pavel_Durov/python_bot#11
No description provided.