Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide Fallback Name Support for Job Callbacks without__name__ #4992

Labels
@sometastycake

Description

@sometastycake

Steps to Reproduce

I have a job, defined as

fromtelegram.extimportContextTypesclassJob:asyncdef__call__(self,context:ContextTypes.DEFAULT_TYPE):        ...application.job_queue.run_repeating(callback=Job(),interval=timedelta(seconds=30,  ),)

And I get an error

AttributeError: 'Job' object has no attribute '__name__'. Did you mean: '__ne__'?

Expected behaviour

Job takes the name of the class as his name

Actual behaviour

The code crashes with an errorAttributeError: 'Job' object has no attribute '__name__'. Did you mean: '__ne__'?

Operating System

macOS 13.4.1

Version of Python, python-telegram-bot & dependencies

Python: 3.11.3Python-telegram-bot: 22.3APScheduler: 3.10.1

Relevant log output

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp