Skip to content

send_media_group give error "Messages.init() missing 1 required keyword-only argument: 'topics'" #164

@Its-Yash-Developer

Description

@Its-Yash-Developer

Checklist

  • I am sure the error is coming from Pyrofork's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork and reproduced the issue using the latest development version

Description

Please fix this error, its not come in last version

Steps to reproduce

It show this error after showering complete upload

Code example

# Construct InputMedia
            if msg.photo:
                print("2.1")
                media_group.append(InputMediaPhoto(file_path, caption=caption))
            elif msg.video:
                print("2.2")
                media_group.append(InputMediaVideo(
                    file_path,
                    caption=caption,
                    width=width,
                    height=height,
                    duration=duration,
                    thumb=thumb_path,
                    supports_streaming=True
                ))
            elif msg.audio:
                print("2.3")
                media_group.append(InputMediaAudio(
                    file_path,
                    caption=caption,
                    duration=msg.audio.duration,
                    performer=msg.audio.performer,
                    title=msg.audio.title,
                    thumb=thumb_path
                ))
            elif msg.document:
                print("2.4")
                media_group.append(InputMediaDocument(
                    file_path,
                    caption=caption,
                    thumb=thumb_path
                ))

        except Exception as e:
            print(f"Error processing album file: {e}")

    if not media_group:
        await edit.edit("Failed to download or process any album media.")
        return

    await edit.edit(f"**Uploading Album ({len(media_group)} files)...**")

    try:
        uploader = dc1

        sent_msgs = await uploader.send_media_group(
            chat_id=dump_channel,
            media=media_group,
            progress=progress_for_pyrogram,
            progress_args=(
                f"**Uploading Album ({len(media_group)} files)...**",
                edit,
                time.time()
            )
        )

Logs

Error uploading album: Messages.init() missing 1 required keyword-only argument: 'topics'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions