Conflicting 'paperpi.ini' configs causes a weird behavior
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python, raspberry-pi
- Área
- embedded-iot
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 205
- Forks
- 17
- Merge medio
- 6 h 12 min
- PR fusionados (30 d)
- 44
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de txoof/PaperPi
-
area:core bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area:core enhancement hardware
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
area:core enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de txoof/PaperPi
Issues similares
-
bug difficulty:2 good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
MakazhanAlpamys/Soup#1865 ·
Los mantenedores suelen responder en 1 día
-
area: agents area: docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exemptPosiblemente ocupada @adityasinha-ghub la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
pylint-dev/pylint#11656 ·
Los mantenedores suelen responder en 1 día
-
area:provisioning effort:S priority:P2 provider:local-libvirt risk:daytime-only status:in-progress type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
randomparity/kdive#3203 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
get() for StrEnumPosiblemente ocupada @FeJo5952 la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
collective/icalendar#1921 · 1 comentario ·
Los mantenedores suelen responder en 1 día