Conflicting 'paperpi.ini' configs causes a weird behavior
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python, raspberry-pi
- 領域
- embedded-iot
調査の方向性
Start with get_config_files in paperpi/paperpi.py and the Screen class, comparing how the two paperpi.ini files are applied before the first clear-screen operation. Done means the screen uses the intended driver from the effective configuration and clears successfully when the files specify different screen types.
索引モデルが issue の本文から書いたものです。
説明
I ran into a weird bug where if two config files have different screens, the first few operations will run on the wrong driver/screen config and then by the time the first plugin is displayed, it works as intended. I was able to replicate the issue (after fixing it). It's also likely not a high impact bug since I'm sure the percentage of people running two different screens on the same device is small. Anyway, here are the details and steps to reproduce...
Issue found: The first "clear screen" operation in the Screen class does not complete successfully when two different screen types are listed in two separate paperpi.ini files. I was using a 4.2" yellow screen on a 32-bit Pi4 running buster. It's not a fresh install and there might be some issues with how I'm running the PaperPi application, but I wanted to at least document it.
Console output:
pi@raspberrypi:~/github/PaperPi $ python paperpi/paperpi.py
18:51:40 paperpi :get_config_files:213 :DEBUG - gathering configuration files
18:51:40 paperpi :get_config_files:249 :INFO - using configuration files to configure PaperPi: [PosixPath('/home/pi/github/PaperPi/paperpi/config/paperpi.ini'), PosixPath('/home/pi/.config/com.txoof.paperpi/paperpi.ini')]
18:51:40 paperpi :main :622 :INFO - ********** PaperPi 0.3.0.0 Starting **********
18:51:40 paperpi :main :623 :DEBUG - configuration:
{'main': {'display_type': 'waveshare_epd.epd4in2c', 'vcom': 0.0, 'max_refresh': 4, 'log_level': 'DEBUG', 'splash': False, 'rotation': 0, 'daemon': False}, 'Plugin: default fallback plugin': {'layout': 'layout', 'plugin': 'default', 'refresh_rate': 30, 'min_display_time': 60, 'max_priority': 32768}, 'Plugin: Reddit Quotes': {'layout': 'layout', 'plugin': 'reddit_quote', 'refresh_rate': 100, 'min_display_time': 50, 'max_priority': 2, 'max_length': 144}, 'xPlugin: Librespot': {'layout': 'layout', 'plugin': 'librespot_client', 'refresh_rate': 10, 'max_priority': 0, 'min_display_time': 15, 'player_name': 'SpoCon-Spotify', 'idle_timeout': 10}, 'Plugin: Moon Phase': {'layout': 'layout', 'plugin': 'moon_phase', 'min_display_time': 30, 'max_priority': 2, 'email': '[email protected]', 'location_name': 'Europe/Amsterdam', 'lat': 52.3, 'lon': 4.9}, 'xPlugin: LMS - Your Player Name': {'layout': 'layout', 'plugin': 'lms_client', 'player_name': 'Your Player Name', 'refresh_rate': 5, 'min_display_time': 30, 'max_priority': 0, 'idle_timeout': 15}, 'xPlugin: Basic Clock': {'layout': 'layout', 'plugin': 'basic_clock', 'refresh_rate': 30, 'min_display_time': 50, 'max_priority': 2}, 'Plugin: XKCD Comic Plugin': {'layout': 'layout', 'plugin': 'xkcd_comic', 'refresh_rate': 1200, 'min_display_time': 120, 'max_x': 800, 'max_y': 600, 'resize': 0, 'max_retries': 10, 'max_priority': 2}, 'xPlugin: Word Clock': {'layout': 'layout', 'plugin': 'word_clock', 'refresh_rate': 125, 'min_display_time': 255, 'max_priority': 2}, 'xPlugin: A Demo Plugin': {'layout': 'layout', 'plugin': 'demo_plugin', 'min_display_time': 30, 'max_priority': 1, 'your_name': 'Slartybartfast', 'your_color': 'chartreuse'}, 'xPlugin: New Yorker Comic': {'layout': 'layout', 'plugin': 'newyorker', 'day_range': 5, 'refresh_rate': 120, 'min_display_time': 60, 'max_priority': 2}, 'xPlugin: Weather Adis Ababa': {'layout': 'layout', 'plugin': 'met_no', 'refresh_rate': 300, 'min_display_time': 40, 'max_priority': 2, 'location_name': 'Adis Ababa', 'lat': 9.0, 'lon': 38.75, 'email': '[email protected]'}, 'Plugin: Crypto Bitcoin v USD': {'plugin': 'crypto', 'layout': 'layout', 'fiat': 'usd', 'coin': 'bitcoin', 'days': 14, 'interval': 'hourly', 'rss_feed': 'https://bitcoinmagazine.com/.rss/full/', 'min_display_time': 30, 'refresh_rate': 300, 'max_priority': 2}, 'xPlugin: decimal binary clock': {'layout': 'layout', 'plugin': 'dec_bin_clock', 'refresh_rate': 30, 'min_display_time': 50, 'max_priority': 2}, '__cmd_line': {'list_plugins': False}}
18:51:40 Screen :_loadEPD :373 :DEBUG - configuring omni_edp.waveshare_epd.epd4in2c
18:51:40 Screen :epd :312 :DEBUG - epd configuration waveshare_epd.epd4in2bc
18:51:40 Screen :rotation :359 :DEBUG - rotation=0, resolution=[400, 300]
18:51:40 Screen :wrapper :247 :DEBUG - initing display
18:51:40 epd4in2bc:ReadBusy :70 :DEBUG - e-Paper busy
18:51:40 epd4in2bc:ReadBusy :73 :DEBUG - e-Paper busy release
18:51:40 Screen :clearEPD :398 :DEBUG - clearing screen
18:51:41 epd4in2bc:ReadBusy :70 :DEBUG - e-Paper busy
First few lines of /etc/default/paperpi.ini:
# CONFIG_VERSION=1
[main]
# waveshare display type use HD for IT8951 displays
display_type = waveshare_epd.epd7in5b_V2
First few lines of /home/pi/.config/com.txoof.paperpi/paperpi.ini:
# CONFIG_VERSION=1
[main]
# waveshare display type use HD for IT8951 displays
display_type = waveshare_epd.epd4in2c
Changing the /etc/default/paperpi.ini to the waveshare_epd.epd4in2c driver fixes the issue.
- 主要言語
- Python
- スター
- 205
- フォーク
- 17
- 平均マージ
- 6時間 12分
- マージ済み PR(30日)
- 44
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
txoof/PaperPi のほかの issue
-
area:core bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:core enhancement hardware
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
area:core enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
SSM GetParameter throttling during concurrent workflow launches対応中かも @alexiswl が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)対応中かも @andest01 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Rename FunctionalRole BOT_DEV to DEV_STAFF対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
pesu-dev/discord_bot#97 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
gradio-app/gradio#13964 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
BSData/horus-heresy-3rd-edition#3232 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信