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

TypeError: get_dialogs() got an unexpected keyword argument 'pinned_only' #53

Closed
skarankevich opened this issue May 8, 2022 · 4 comments

Comments

@skarankevich
Copy link

Traceback (most recent call last):
File "/Users/admin/Projects/telegram-delete-all-messages/cleaner.py", line 134, in
deleter.select_groups()
File "/Users/admin/Projects/telegram-delete-all-messages/cleaner.py", line 50, in select_groups
chats = self.get_all_chats()
File "/Users/admin/Projects/telegram-delete-all-messages/cleaner.py", line 40, in get_all_chats
dialogs = app.get_dialogs(pinned_only=True)
File "/Users/admin/.pyenv/versions/3.9.12/lib/python3.9/site-packages/pyrogram/sync.py", line 53, in async_to_sync_wrap
coroutine = function(*args, **kwargs)
TypeError: get_dialogs() got an unexpected keyword argument 'pinned_only'

@ghost
Copy link

ghost commented May 9, 2022

I can reproduce same issue on Arch Linux and Ubuntu 22.04 LTS.

@ghost
Copy link

ghost commented May 10, 2022

I managed to run it.
Issue is likely pyrogram module. By default, pyrogram 2.0 will be installed, but this python script isn't updated yet.
I uninstalled pyrogram 2.0.
pip3 uninstall pyrogram
And I reinstalled pyrogram 1.4.16
pip3 install -U Pyrogram-1.4.16
done.
Disclaimer: use my method at your own risk as I am not aware of potential security risks with downgrading Pyrogram.

@ghost ghost mentioned this issue May 10, 2022
@AtomicSpark
Copy link

I was able to reproduce the issue on Windows 11.

I was able to work around this by changing pyrogram to pyrogram<2.0 in requirements.txt and running install.bat again.

Thanks @andrsn0w for the tip!

@gurland
Copy link
Owner

gurland commented Jul 1, 2022

Current version of the project uses pyrogram==1.4 fixed in #52 so closed for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants