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

Getting error after filling INSTA_SESSIONFILE_ID in config.py #18

Open
SanujaNS opened this issue Jul 23, 2022 · 0 comments
Open

Getting error after filling INSTA_SESSIONFILE_ID in config.py #18

SanujaNS opened this issue Jul 23, 2022 · 0 comments

Comments

@SanujaNS
Copy link

Bot works fine before but after fill INSTA_SESSIONFILE_ID in config.py can't run main.py.
Error -

~/Instagram-Bot-main# python3 main.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/file_id.py", line 228, in decode
    file_type = FileType(file_type)
  File "/usr/lib/python3.8/enum.py", line 339, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.8/enum.py", line 663, in __new__
    raise ve_exc
ValueError: 220 is not a valid FileType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 47, in <module>
    bot.run(main())
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/run.py", line 51, in run
    run(coroutine)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "main.py", line 42, in main
    await bot.download_media(Config.INSTA_SESSIONFILE_ID, file_name=f"./{Config.USER}")
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/messages/download_media.py", line 122, in download_media
    file_id_obj = FileId.decode(file_id_str)
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/file_id.py", line 230, in decode
    raise ValueError(f"Unknown file_type {file_type} of file_id {file_id}")
ValueError: Unknown file_type 220 of file_id 3A......OzxoK....Cjm7cc_W.....SanoqIs.....3TwlQ

(INSTA_SESSIONFILE_ID is correct)
Looking forward to a solution.
Thank you...

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

1 participant