Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Флуд и UnknownIntent #173

Open
ddenzer opened this issue Jul 17, 2022 · 2 comments
Open

Флуд и UnknownIntent #173

ddenzer opened this issue Jul 17, 2022 · 2 comments
Labels
bug Something isn't working core Something, that affects core functionality

Comments

@ddenzer
Copy link

ddenzer commented Jul 17, 2022

При флуде инлайн клавиатуры плюет исключение aiogram_dialog.exceptions.UnknownIntent: Context not found for intent id: Z7ZjG2

events_isolation не помогает

aiogram3
v2.0.0b7

@Tishka17 Tishka17 added bug Something isn't working core Something, that affects core functionality labels Jul 25, 2022
@RuslanZaliznyak
Copy link

Is there any way to resize the buttons in "Multiselect" so that you can write long text?

@Sonotoki-da
Copy link

Just found out that if you comment the class IntentErrorMiddleware out in registry.py in the library's manager folder (169-173 lines), you'll start to get actual errors from where you did a mistake. In my case, I was sending a None type object instead of a list object in the getter to feed a Select widget with Buttons, thus got a related error message:

  File "/home/diejoeboo/Documents/VSCode/mybot/venv/lib/python3.10/site-packages/aiogram_dialog/widgets/kbd/select.py", line 72, in _render_keyboard
    for pos, item in enumerate(self.items_getter(data))
TypeError: 'NoneType' object is not iterable

instead of:

  File "/home/diejoeboo/Documents/VSCode/mybot/venv/lib/python3.10/site-packages/aiogram_dialog/context/storage.py", line 35, in load_context
    raise UnknownIntent(
aiogram_dialog.api.exceptions.UnknownIntent: Context not found for intent id: wLPzka

@Tishka17, maybe because of this generated window with wrong keyboard layout, we can't use the window after restarting the bot? At some point, I couldn't get buttons to work in the old window after restarting the bot, and of course, I'm using redis for the storage. But it was working like a charm until my project code grow in the numbers and became more complex with a couple more of ifs in the getters. I should check my code thoroughly first though, because I feel like I messed up somewhere.

My environment settings for reference:
Python:

Python 3.10.6 (main, Aug  3 2022, 17:39:45) [GCC 12.1.1 20220730] on linux

aiogram and aiogram_dialog:

aiogram==3.0.0b5
aiogram-dialog==2.0.0b11

Redis and Postgresql:

Redis 7.0.4 (00000000/0) 64 bit
postgres (PostgreSQL) 14.5

Anyways, thank you guys for creating this amazing library! I'm loving it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Something, that affects core functionality
Projects
None yet
Development

No branches or pull requests

4 participants