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

Runtime error after sending video - ID error #4

Closed
XDavidT opened this issue Apr 1, 2021 · 2 comments
Closed

Runtime error after sending video - ID error #4

XDavidT opened this issue Apr 1, 2021 · 2 comments

Comments

@XDavidT
Copy link

XDavidT commented Apr 1, 2021

I got error:

Pyrogram v1.2.6, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)

remove: path should be string, bytes or os.PathLike, not NoneType
Download Failed: [400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")
[400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")
Traceback (most recent call last):
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 60, in resolve_peer
    return await self.storage.get_peer_by_id(peer_id)
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/storage/sqlite_storage.py", line 147, in get_peer_by_id
    raise KeyError(f"ID not found: {peer_id}")
KeyError: 'ID not found: -1001478052015'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 217, in handler_worker
    await handler.callback(self.client, *args)
  File "bot.py", line 70, in HelpWatermark
    await bot.send_message(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/messages/send_message.py", line 127, in send_message
    peer=await self.resolve_peer(chat_id),
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/resolve_peer.py", line 109, in resolve_peer
    await self.send(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
    r = await self.session.send(
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/session/session.py", line 425, in send
    return await self._send(data, timeout=timeout)
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/session/session.py", line 395, in _send
    RPCError.raise_it(result, type(data))
  File "/home/xdavidt/Watermark-Bot/VENV/lib/python3.8/site-packages/pyrogram/errors/rpc_error.py", line 78, in raise_it
    raise getattr(
pyrogram.errors.exceptions.bad_request_400.ChannelInvalid: [400 CHANNEL_INVALID]: The channel parameter is invalid (caused by "channels.GetChannels")

Not sure why need log_channel, but I open a new channel and use https://t.me/username_to_id_bot to find out the ID.
So I changed that line into:
LOG_CHANNEL = int(-1001478052015)

@AbirHasan2005
Copy link
Owner

You put wrong code!
That will be LOG_CHANNEL = -1001478052015 !

I think you are deploying on your private server.

@XDavidT
Copy link
Author

XDavidT commented Apr 4, 2021

You put wrong code!
That will be LOG_CHANNEL = -1001478052015 !

I think you are deploying on your private server.

Even in that way it's not working

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

2 participants