Skip to main content
February 4, 2026
Solved

.env not seen as existing from Python

  • February 4, 2026
  • 2 replies
  • 56 views

Hello,

I tried to use the new local-env feature to pass credentials to Mistral Vibe but the `.env` is considered as not existing. Cf. https://github.com/mistralai/mistral-vibe/issues/302

>>> from pathlib import Path
>>> vibe_env = Path("~/.config/vibe/.env")
>>> vibe_env.exists()
False

I can however access the file in the Shell:

> head -n 1 ~/.config/vibe/.env
# This file was generated by 1Password. Any manual edits will be lost.

 

Best answer by nikaro

My bad, path should be expanded before checking. `is_fifo()` is working fine then:

>>> vibe_env.expanduser().is_fifo()
True

 

2 replies

nikaroAuthor
February 4, 2026

From the shell it is seen as a named pipe:

⏺ ~ > ls -l ~/.config/vibe/.env
prw-------@ 1 nicolas  staff  0 Feb  4 10:42 /Users/nicolas/.config/vibe/.env|

But even `.is_fifo()` returns `False`:

>>> vibe_env.is_fifo()
False

 

nikaroAuthorAnswer
February 4, 2026

My bad, path should be expanded before checking. `is_fifo()` is working fine then:

>>> vibe_env.expanduser().is_fifo()
True