Skip to content

Make it easier to find custom bot modules when using zulip-botserver #636

Open

Description

@timabbott

I don't have a specific proposal, but probably some combination of documenting PYTHONPATH and adjusting how we search for bot modules is well worth doing to make it easier to help folks who are not deeply familiar with Python get bots running successfully. This thread has discussion https://chat.zulip.org/#narrow/stream/92-learning/topic/bot.20basics/near/1068769.

The first step for this issue is coming up with specific proposals for how to improve the implementation or documentation.

Activity

  1. neiljp commented on Nov 24, 2020

    @neiljp
    Contributor

    I saw this and wondered if at least for our packaged bots the registration implementation which I started working on in #517 may be useful?

  2. b-thebest commented on Dec 4, 2020

    @b-thebest

    Can I work on this

  3. neiljp commented on Dec 4, 2020

    @neiljp
    Contributor

    @b-thebest There is no firm plan for going about this yet, so as Tim mentioned we likely want a proposal for fixing it first - I'd suggest discussing ideas in #integrations on chat.zulip.org.

  4. timabbott commented on Jul 29, 2021

    @timabbott
    SponsorMemberAuthor

    @PIG208 do you think #708 resolved this? I guess we can leave this option open until wethe documentation feels good for this workflow.

  5. avijitdas126 commented on Feb 1, 2025

    @avijitdas126
    Collaborator

    @zulipbot claim

  6. zulipbot commented on Feb 1, 2025

    @zulipbot
    Member

    Hello @avijitdas126, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

    We look forward to your valuable contributions!

  7. i-naeem commented on Mar 27, 2025

    @i-naeem
    Collaborator

    @zulipbot claim

  8. zulipbot commented on Mar 27, 2025

    @zulipbot
    Member

    Welcome to Zulip, @i-naeem! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

    Here's some tips to get you off to a good start:

    As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

    See you on the other side (that is, the pull request side)!

  9. zulipbot commented on Dec 31, 2025

    @zulipbot
    Member

    @i-naeem You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

  10. Jami436 commented on Feb 1, 2026

    @Jami436

    @zulipbot Claim

  11. 4 remaining items

  12. zulipbot commented on Oct 12, 2026

    @zulipbot
    Member

    @ahmedforge You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

  13. ahmedforge commented on Oct 13, 2026

    @ahmedforge
    Collaborator

    I’m still working on this issue. I submitted draft PR #925 and am awaiting
    feedback on the proposed documentation scope. I’m available to address
    review comments.

  14. Hedger3 commented on Oct 18, 2026

    @Hedger3
    Collaborator

    @zulipbot Claim

  15. Hedger3 commented on Oct 18, 2026

    @Hedger3
    Collaborator

    @zulipbot claim

  16. zulipbot commented on Oct 18, 2026

    @zulipbot
    Member

    Welcome to Zulip, @Hedger3! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.

    To get started:

    1. Work through all the "Prior to picking up your first issue" sections of the Zulip contributor guide.
    2. Post a comment here describing your plan for how to approach this issue. Before you claim an issue, you should be confident that you will be able to tackle it effectively.
    3. Accept the invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. To avoid filling your inbox, we recommend unwatching this repository.

    The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always @zulipbot abandon this issue, and pick a different one.

    If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.

  17. ahmedforge commented on Oct 18, 2026

    @ahmedforge
    Collaborator

    @Hedger3 I already submitted PR #925 for the custom bot-loading documentation, and it is ready for review. I’m still available to address feedback. Could we coordinate our scope to avoid duplicating work?

  18. Hedger3 commented on Oct 27, 2026

    @Hedger3
    Collaborator

    Hey @ahmedforge, sorry for the late reply! No overlap I think: #933 only changes the "Could not load bot module" error in zulip-run-bot, no docs.

  19. Hedger3 commented on Oct 27, 2026

    @Hedger3
    Collaborator

    I've opened #933 for the zulip-run-bot side of this. It has two commits:

    1. Fills in the bot name in the --provision error, which printed a literal '{}'.
    2. Makes the "Could not load bot module" error say where it looked (a file at that path, bots/<name>/<name>.py among the bundled bots, and a module importable from PYTHONPATH), and suggests passing the path to the bot's .py file. With -r, it gets a separate registry message.

    Both have tests in test_run.py. I reproduced the original problem first with a copy of helloworld at ~/mybot/mybot.py: running it by name fails even from inside ~/mybot, while passing the full path works.

    I posted this plan in the chat thread a little while ago but haven't heard back yet, so feedback on the approach is welcome here or on the PR.

  20. ahmedforge commented on Oct 28, 2026

    @ahmedforge
    Collaborator

    Thanks for clarifying! That sounds complementary to the documentation in #925. I’ll keep my PR focused on the botserver documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions