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

download youtube shows "Unknow command" #261

Open
makusujp opened this issue Mar 22, 2024 · 2 comments
Open

download youtube shows "Unknow command" #261

makusujp opened this issue Mar 22, 2024 · 2 comments

Comments

@makusujp
Copy link

windows docker v4.28.0, WSL2

just send the URL
ex: https://youtu.be/XHTrLYShBRQ
and you see the yt_bot log with below error message

2024-03-22 17:14:32 Traceback (most recent call last):
2024-03-22 17:14:32 File "/usr/local/lib/python3.11/site-packages/pyrogram/dispatcher.py", line 268, in handler_worker
2024-03-22 17:14:32 await handler.callback(self.client, *args)
2024-03-22 17:14:32 File "/usr/local/lib/python3.11/site-packages/pyrogram/handlers/message_handler.py", line 151, in resolve_future_or_callback
2024-03-22 17:14:32 await self.original_callback(client, message, *args)
2024-03-22 17:14:32 File "/app/bot/core/callbacks.py", line 38, in on_message
2024-03-22 17:14:32 user = client.allowed_users[get_user_id(message)]
2024-03-22 17:14:32 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
2024-03-22 17:14:32 KeyError: 6053554717

bot responds: "Unknow command"

im using the zip for the commit: 20c35b0

@tropicoo
Copy link
Owner

Hello, I would need to see your configuration with removed personal data and screenshot from Telegram.
Didn't see this issue before. Did you send the link from your user to Bot directly or from some group?

@makusujp
Copy link
Author

sorry for late reply
win11/docker desktop v4.29.0
re-build again for 32e9b92

in yt_bot log:

2024-04-10 14:32:23 2024-04-10 06:32:23,670 - [ERROR] - [pyrogram.dispatcher:342] - 6053554717
2024-04-10 14:32:23 Traceback (most recent call last):
2024-04-10 14:32:23   File "/usr/local/lib/python3.12/site-packages/pyrogram/dispatcher.py", line 329, in handler_worker
2024-04-10 14:32:23     await handler.callback(self.client, *args)
2024-04-10 14:32:23   File "/usr/local/lib/python3.12/site-packages/pyrogram/handlers/message_handler.py", line 151, in resolve_future_or_callback
2024-04-10 14:32:23     await self.original_callback(client, message, *args)
2024-04-10 14:32:23   File "/app/bot/core/callbacks.py", line 38, in on_message
2024-04-10 14:32:23     user = client.allowed_users[get_user_id(message)]
2024-04-10 14:32:23            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
2024-04-10 14:32:23 KeyError: 6053554717
2024-04-10 14:32:26 2024-04-10 06:32:26,602 - [INFO] - [VideoUploadTask:140] - Uploading "Introducing iPhone 15 | WOW | Apple.mp4" [10.1MiB] [cached: False] to chat id "1277514877"
2024-04-10 14:32:32 2024-04-10 06:32:32,962 - [INFO] - [VideoUploadTask:298] - Saving telegram file cache
2024-04-10 14:32:32 2024-04-10 06:32:32,963 - [INFO] - [VideoUploadTask:140] - Uploading "Introducing iPhone 15 | WOW | Apple.mp4" [10.1MiB] [cached: True] to chat id "-1001392905200"
2024-04-10 14:32:33 2024-04-10 06:32:33,753 - [INFO] - [SuccessDownloadHandler:112] - Cleaning up task "4f54ce66-d439-41c9-ad97-ad6073b72fa6": removing download content directory "/tmp/download_tmpfs/downloaded/oxro" with files {'Introducing iPhone 15 | WOW | Apple.jpg': '35.7KiB', 'Introducing iPhone 15 | WOW | Apple.mp4': '10.1MiB'}

Config.yml (pretty sure i use the latest example file to modify such IDs and tokens the issue still there
*removed the personal data

telegram:
  api_id: API_ID
  api_hash: "API_HASH"
  token: "BOT_TOKEN"
  lang_code: !!str "en"
  max_upload_tasks: 2
  url_validation_regexes:
    - "^http(s)?:\\/\\/.+$"
  allowed_users:
    - id: USER_ID
      is_admin: !!bool True
      send_startup_message: !!bool True
      download_media_type: "VIDEO"
      save_to_storage: !!bool False
      use_url_regex_match: !!bool True
      upload:
        upload_video_file: !!bool True
        upload_video_max_file_size: 2147483648
        forward_to_group: !!bool True
        forward_group_id: GROUP_ID
        silent: !!bool False
        video_caption:
          include_title: !!bool True
          include_filename: !!bool False
          include_link: !!bool True
          include_size: !!bool True
  api:
    upload_video_file: !!bool False
    upload_video_max_file_size: 2147483648
    upload_to_chat_ids:
      - 00000000000
      - -00000000000
    silent: !!bool False
    video_caption:
      include_title: !!bool True
      include_filename: !!bool False
      include_link: !!bool True
      include_size: !!bool True
ytdlp:
  version_check_enabled: !!bool True
  version_check_interval: 86400
  notify_users_on_new_version: !!bool True

the telegram bot message

@makusujp makusujp reopened this Apr 10, 2024
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