Skip to content

[Bug] Zulip connector fails with "tempfile.tempdir" error and no documents indexed on Onyx 3.0.5 + Zulip 9.4 #10311

@kenbacani

Description

@kenbacani

Hi,

We are trying to connect the Onyx 3.0.5 to our Zulip installation 9.4.

1. Bug in Zulip Connector — tempfile.tempdir vs tempfile.gettempdir():

Claude identified an issue in "/app/onyx/connectors/zulip/connector.py"

tempdir = tempfile.tempdir  # This is None unless explicitly set
if tempdir is None:
    raise Exception("Could not determine tempfile directory")

The code is reading tempfile.tempdir — which is a user-settable variable that defaults to None — instead of calling tempfile.gettempdir(), which is the correct function that actually returns the system temp directory (and is what proved writable as /tmp in your test).

This is a bug in the Onyx Zulip connector code. It should be:

tempdir = tempfile.gettempdir()

The temporary fix we applied to the running container:

docker exec -it onyx-background-1 sed -i \
  's/tempdir = tempfile.tempdir/tempdir = tempfile.gettempdir()/' \
  /app/onyx/connectors/zulip/connector.py

Also remove the now-unnecessary None check (optional but clean)
Verify the change looks right first:
docker exec -it onyx-background-1 grep -n "tempdir\|gettempdir" /app/onyx/connectors/zulip/connector.py

docker restart onyx-background-1

This resolved the issue when the connector was showing errors during indexing.

2. No Documents Being Indexed

Despite the connector now showing as healthy, no documents are being indexed from Zulip.

We have verified:

  • The Realm is set to the name of the Zulip organisation
  • The bot account is a member of all test channels

Can you advise:

  • Is the tempfile.tempdir bug a known issue, or is it specific to a particular version?
  • Which versions of Zulip does the Onyx connector officially support?

Many thanks

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