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

improve exit on bad config file

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

Start in paperpi.py at get_config_files, where the traceback shows parse_config() is called, and inspect how configuration parsing errors are handled. Reproduce the reported malformed paperpi.ini and check the project's tests for config handling. Done means a bad config produces a clearer error identifying the problem rather than an unhandled traceback.

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

説明

enhancement Work To Do
12:38:13 paperpi :get_config_files:251 :INFO       - using configuration files to configure PaperPi: [PosixPath('/home/pi/src/PaperPi/paperpi/config/paperpi.ini'), PosixPath('/home/pi/.config/com.txoof.paperpi/paperpi.ini')]
Traceback (most recent call last):
  File "/home/pi/src/PaperPi/paperpi/./paperpi.py", line 758, in <module>
    exit_code = main()
  File "/home/pi/src/PaperPi/paperpi/./paperpi.py", line 644, in main
    config_files = get_config_files(cmd_args)
  File "/home/pi/src/PaperPi/paperpi/./paperpi.py", line 254, in get_config_files
    config_files.parse_config()
  File "/home/pi/.local/share/virtualenvs/PaperPi-VBShxqF-/lib/python3.9/site-packages/ArgConfigParse/ArgConfigParse.py", line 227, in parse_config
    self.parser.read(file)
  File "/usr/lib/python3.9/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib/python3.9/configparser.py", line 1113, in _read
    raise e
configparser.ParsingError: Source contains parsing errors: PosixPath('/home/pi/.config/com.txoof.paperpi/paperpi.ini')
	[line 195]: "'''\n"

It would be good to exit with a better error message and try to identify the problem in the config file rather than just crashing out.

主要言語
Python
スター
205
フォーク
17
平均マージ
5時間 42分
マージ済み PR(30日)
50

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

txoof/PaperPi のほかの issue

txoof/PaperPi の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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