theskumar / theskumar/python-dotenv
AssertionError when attempting to locate dotenv file
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 8.9k
- Forks
- 581
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hello,
I updated to the latest python-dotenv version (1.0.1) this morning and am now starting to see the following Assertion Errors:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
<>
File "/usr/local/lib/python3.11/site-packages/dotenv/main.py", line 305, in find_dotenv
assert frame.f_back is not None
^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
The code that generated the above looks like the following:
if path := find_dotenv(raise_error_if_not_found=False):
load_dotenv()
Please let me know if there are any other logs or data I can provide to help the debugging/investigation process
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Start with dotenv/main.py at find_dotenv, especially the assertion at line 305, and reproduce the shown call on Python 3.11 with python-dotenv 1.0.1. Done means locating the cause of the AssertionError and verifying that the reported invocation handles the missing dotenv-file case without raising it.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100