Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

using set_key on a file over the network results in error

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

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

評価

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

調査の方向性

Start at the set_key entry point and reproduce the shown sequence with env_file_path on a Windows network path. Compare the first and second calls and verify that repeated updates can create or update the .env file without the reported cross-drive error.

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

説明

When trying to use set_key to create a .env file if one dosn't exist the first line works great but the second line always fails with this line because of the way that windows handles moving files across networks.

OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\\Users\\[my username]\\AppData\\Local\\Temp\\tmpk0c72zk9' ->'N:\\[my username]\\Documents\\[project name]\\.env'

code that generates the error

# load the stuff that shouldn't be given out
user_config = dotenv_values(env_file_path)

if len(user_config) == 0:
    module_logger.fatal('.env file with all of the needed stuff was empty. Creating it then exiting')
    module_logger.debug(f'creating the .env file at {env_file_path.absolute()}')
    env_file_path.touch()

    module_logger.debug('setting the values inside the .env file')
    set_key(env_file_path,'username','username') # <-- this line gets written to the file
    set_key(env_file_path,'password','password') # <-- line that fails
    set_key(env_file_path,'client_id','client id (tools>options>system settings)')
    set_key(env_file_path,'client_secret','client secret (tools>options>system settings)')
    sys.exit(1)

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

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

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

はじめの一歩

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

theskumar/python-dotenv のほかの issue

theskumar/python-dotenv の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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