Raw functions and types are changed in Pyrogram version >1
opened this issue · comments
With Python3 latest version of Pyrogram is installed.
Following lines are related to the old version of Pyrogram and cause error on running script on Ubuntu version 18.04 and later:
from pyrogram.api.functions.messages import Search
from pyrogram.api.types import InputPeerSelf, InputMessagesFilterEmpty
from pyrogram.api.types.messages import ChannelMessages
This code should be used instead
from pyrogram.raw.functions.messages import Search
from pyrogram.raw.types import InputPeerSelf, InputMessagesFilterEmpty
from pyrogram.raw.types.messages import ChannelMessages
Please see the docs.
+1 this fixed the script's import errors and it worked successfully!
Thanks for your report! Fixed in #17 PR