theskumar / theskumar/python-dotenv

AssertionError when attempting to locate dotenv file

オープン
#499 コメント 7 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.9k
フォーク
581
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。