Open sebastianelsner opened 6 months ago
Same here
Same issue.
Unable to instantiate connector due to Could not determine tempfile directory
Marking in-progress attempt 'connector: 1, credential: 1' as failed due to Stopped mid run, likely due to the background process being killed
FYI @elo-siema
@sebastianelsner I was able to resolve this issue, and get my Zulip Connector running!
Danswer has successfully fetched, processed, and inserted messages from Zulip into its database.
Here are the details:
Issue:
The Zulip Connector in Danswer was raising the following error during indexing:
Exception: Could not determine tempfile directory
Followed by a subsequent error:
TypeError: expected str, bytes or os.PathLike object, not NoneType
background:
environment:
- TMPDIR=/tmp
echo $TMPDIR
ls -ld /tmp
touch /tmp/testfile.txt
Before:
if tempfile.tempdir is None:
raise Exception("Could not determine tempfile directory")
config_file = os.path.join(tempdir, f"zuliprc-{self.realm_name}")
After:
config_file = os.path.join(tempfile.gettempdir(), f"zuliprc-{self.realm_name}")
I was trying to integrate danswer with Zulip but am running into an issue:
As far as I can see this place is the culprit.
https://github.com/danswer-ai/danswer/blame/546815dc8cf462a8b8aedf729fbd2897804ea5e0/backend/danswer/connectors/zulip/connector.py#L50`
Looking at the python docs,
tempfile.tempdir
will allways be NoneSo the tempdir value is not initialized anywhere.