Conflicting 'paperpi.ini' configs causes a weird behavior
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python, raspberry-pi
- Ambito
- embedded-iot
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 205
- Fork
- 17
- Merge medio
- 6h 13m
- PR unite (30g)
- 39
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di txoof/PaperPi
-
area:core bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area:web needs-decision
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
area:core enhancement
Difficoltà 4/5 1-2 giorni Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di txoof/PaperPi
Issue simili
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitApertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
krkn-chaos/krkn#1627 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NousResearch/hermes-agent#136483 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] LazyStackedTensorDictStore zeroes the last byte of a new key set on the last elementForse già presa @peterdsharpe l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pytorch/tensordict#2307 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno