Skip to content

Replaced error TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument '<name>' with a more understandable #1114

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

Merged
merged 2 commits into from
Feb 5, 2023

Conversation

JrooTJunior
Copy link
Member

Description

The most common question from the newbies who migrating from 2.x version to 3.x that is TypeError: TelegramEventObserver.__call__() got an unexpected keyword argument '<name>'.

This error caused in due to keyword-filters is no more supported (#942).

This pull-request adds an customized error with explanation why you can't use keyword filters with link to the documentation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works as expected
  • New and existing unit tests pass locally with my changes
  • My changes generate no new warnings or errors
  • My changes are compatible with minimum requirements of the project
  • I have made corresponding changes to the documentation

@JrooTJunior JrooTJunior added enhancement Make it better! 3.x Issue or PR for stable 3.x version labels Feb 5, 2023
@JrooTJunior JrooTJunior added this to the 3.0.0-beta.7 milestone Feb 5, 2023
@github-actions
Copy link

github-actions bot commented Feb 5, 2023

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Merging #1114 (ab16790) into dev-3.x (d07e8fc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1114   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          340       340           
  Lines         8823      8829    +6     
=========================================
+ Hits          8823      8829    +6     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiogram/dispatcher/event/telegram.py 100.00% <100.00%> (ø)
aiogram/exceptions.py 100.00% <100.00%> (ø)

@JrooTJunior JrooTJunior merged commit 021ae56 into dev-3.x Feb 5, 2023
@JrooTJunior JrooTJunior deleted the restrict-keywords branch February 12, 2023 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issue or PR for stable 3.x version enhancement Make it better!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant