Giter Club home page Giter Club logo

epd_display's Introduction

Top Langs Aaron's GitHub stats

Who I Am

I'm a hacker, maker and mender of things. I love an interesting challenge and can't resist being nerd sniped.

More About Me

  • ๐Ÿ”ญ Iโ€™m currently working on building SQL queries for to interface Student Information Systems with Learning Management Systems
  • ๐ŸŒฑ Iโ€™m currently learning SQL
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on PaperPi, a quiet internet radio
  • ๐Ÿ“ซ How to reach me:
  • ๐Ÿ“œMy Resume of Projects
  • ๐Ÿ˜„ Pronouns: He/Him

epd_display's People

Contributors

aaronr8684 avatar logge avatar txoof avatar valanm22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epd_display's Issues

C to F

Looking in the config files; cannot find where to convert the Met No from Celsius to Fahrenheit? Can you point me in the right direction? Thanks.

tar file corupt

pi@raspberrypi:~ $ tar xvzf paperpi_latest.tgz
paperpi/./dist/paperpi

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
cloned from your site due to tar not workintg. cant launch paperpi. not working.

add better handling when IT8951 driver cannot be reached at init and possibly during run time

When the driver board cannot be reached:

Traceback (most recent call last):
  File "paperpi/paperpi.py", line 658, in <module>
  File "paperpi/paperpi.py", line 620, in main
  File "paperpi/paperpi.py", line 346, in setup_display
  File "epdlib/Screen.py", line 195, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 259, in epd
  File "epdlib/Screen.py", line 417, in _epd_hd
  File "IT8951/display.py", line 219, in __init__
  File "IT8951/interface.py", line 33, in __init__
  File "IT8951/interface.py", line 103, in update_system_info

related to Issue #3

Plugin Ideas

  • Pull quotes similar to Audry
  • Pull images from google image, imgr, etc. and display in rotation
  • Add stock quotes plugin -- build similar to weather plugin allowing multiple stocks to be tracked on individual screens
  • NYT Headlines
  • NPR Headlines

add better error handling on new_epdlib branch when epd library cannot be loaded

crashes on unknown epd -- offer better feedback to user

Traceback (most recent call last):
  File "paperpi/paperpi.py", line 658, in <module>
  File "paperpi/paperpi.py", line 620, in main
  File "paperpi/paperpi.py", line 346, in setup_display
  File "epdlib/Screen.py", line 195, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 264, in epd
  File "epdlib/Screen.py", line 467, in _epd_non_hd
epdlib.Screen.ScreenError: invalid waveshare module: epd2in

Paperpi doesn't find Numpy though module is installed

Getting the below when trying to run Paperpi. Numpy was installed using apt install python3-numpy. I have also tried pip3 install numpy. Same outcome. Anyone have any ideas?

pi@raspberrypi:~ $ ./paperpi/dist/paperpi
09:22:53 paperpi:setup_display:325:CRITICAL - Error loading epd from configuration
09:22:53 paperpi:main:654:ERROR - config files used: [PosixPath('/tmp/_MEIh8nd8Z/config/paperpi.ini'), PosixPath('/home/pi/.config/com.txoof.paperpi/paperpi.ini')]
09:22:53 paperpi:do_exit:51:ERROR - failure caused exit: could not load epd module: epd2in13_V2 -- error: failed to load epd2in13_V2 with error: No module named 'numpy'

######################################################################
could not load epd module: epd2in13_V2 -- error: failed to load epd2in13_V2 with error: No module named 'numpy'
######################################################################

Exiting

crash on unknown plugin layout

when an unknown layout is found, PaperPi crashes -- instead consider raising a WARNING and skip the loading of the module:

09:40:56 paperpi:build_plugin_list:382:INFO - [[ Plugin: LMS MacPlay ]]
Traceback (most recent call last):
  File "paperpi.py", line 658, in <module>
    exit_code = main()
  File "paperpi.py", line 639, in main
    plugins = build_plugin_list(config, screen.resolution, cache)
  File "paperpi.py", line 402, in build_plugin_list
    my_config['layout'] = getattr(module.layout, values['layout'])
AttributeError: module 'plugins.lms_client.layout' has no attribute 'twoColumn'```

Documentation error

In a number of places across documentation for this project (Plugins.md, step_by_step_instructions.md) the location of the configuration file is (incorrectly) referred to as /etc/defaults/paperpi.ini instead of /etc/default/paperpi.ini. Presume this is a typo?

xkcd plugin crashes when backend is not available

looks like wrapping json decode in a try/except will resolve this

19:01:34 paperpi:update_plugins:454:INFO - __________Plugin: XKCD Comic Plugin__________
19:01:34 xkcd_comic:update_function:107:DEBUG - XKCD CONFIG: {'plugin': 'xkcd_comic', 'max_x': 800, 'max_y': 600, 'resize': 1, 'max_retries': 10}
19:01:41 xkcd_comic:get_comic_json:45:ERROR - failed to decode JSON result possibly due to previous errors: [Errno Expecting value]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 Backend unavailable, connection timeout</title>
  </head>
  <body>
    <h1>Error 503 Backend unavailable, connection timeout</h1>
    <p>Backend unavailable, connection timeout</p>
    <h3>Guru Mediation:</h3>
    <p>Details: cache-ams12725-AMS 1642010501 2485529884</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>
: 1
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 686, in main
  File "paperpi/paperpi.py", line 506, in update_loop
  File "paperpi/paperpi.py", line 459, in update_plugins
  File "/tmp/_MEIqImArp/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEIqImArp/plugins/xkcd_comic/xkcd_comic.py", line 143, in update_function
    filename = comic_json['img'].split('/')[-1]

spotify plugin causes crash when local librespot client is not responding

This appears to be due to a variable assignment issue in the spotify plugin that can be easily resoloved:

Oct  2 21:34:03 paperpi paperpi[599]: [623] Failed to execute script 'paperpi' due to unhandled exception!
Oct  2 21:34:03 paperpi paperpi[599]: Traceback (most recent call last):
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 859, in <module>
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 842, in main
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 505, in update_loop
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 460, in update_plugins
Oct  2 21:34:03 paperpi paperpi[599]:   File "/tmp/_MEI1jUQDk/library/Plugin.py", line 254, in update
Oct  2 21:34:03 paperpi paperpi[599]:     is_updated, data, priority = self.update_function(*args, **kwargs)
Oct  2 21:34:03 paperpi paperpi[599]:   File "/tmp/_MEI1jUQDk/plugins/librespot_client/librespot_client.py", line 132, in update_function
Oct  2 21:34:03 paperpi paperpi[599]:     if player_status.status_code == 200:
Oct  2 21:34:03 paperpi paperpi[599]: UnboundLocalError: local variable 'player_status' referenced before assignment
Oct  2 21:34:03 paperpi systemd[1]: paperpi-daemon.service: Main process exited, code=exited, status=1/FAILURE
Oct  2 21:34:03 paperpi systemd[1]: paperpi-daemon.service: Failed with result 'exit-code'.

reddit quote crash

19:34:13 reddit_quote:update_function:149:DEBUG - checking mtime of cached json file: /tmp/PaperPi_ird7eumt/reddit_quote.json
19:34:13 reddit_quote:update_function:174:DEBUG - cached data expired, fetching fresh data
19:34:13 reddit_quote:update_function:179:DEBUG - downloading fresh data from reddit
19:34:13 reddit_quote:_fetch_quotes:46:DEBUG - fetching data from reddit
19:34:13 reddit_quote:_process_quotes:78:DEBUG - processing 25 quotes
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 682, in main
  File "paperpi/paperpi.py", line 431, in build_plugin_list
  File "/tmp/_MEIW9UIsg/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEIW9UIsg/plugins/reddit_quote/reddit_quote.py", line 181, in update_function
    json_data = _process_quotes(raw_quotes)
  File "/tmp/_MEIW9UIsg/plugins/reddit_quote/reddit_quote.py", line 103, in _process_quotes
    processed_quotes.append({'len': len(q), 'text': text, 'attribution': attribution})
UnboundLocalError: local variable 'text' referenced before assignment
[3194] Failed to execute script 'paperpi' due to unhandled exception!

Create_devel_venv.sh failed

See the output below. Issue was fixed by manually running sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev and then running the shell script again. I believe this should be a quick fix in the "cd_apt_packages" file, but, I'm not sure. If it is just a simple add to the CORE var, I'm happy to make the change and submit the PR.

  ๐Ÿ   โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰ 22/22 โ€” 00:02:22
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
[pipenv.exceptions.InstallError]: Collecting pycairo
[pipenv.exceptions.InstallError]:   Using cached pycairo-1.20.1.tar.gz (344 kB)
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): finished with status 'done'
[pipenv.exceptions.InstallError]: Building wheels for collected packages: pycairo
[pipenv.exceptions.InstallError]:   Building wheel for pycairo (setup.py): started
[pipenv.exceptions.InstallError]:   Building wheel for pycairo (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]:   Running setup.py clean for pycairo
[pipenv.exceptions.InstallError]: Failed to build pycairo
[pipenv.exceptions.InstallError]: Installing collected packages: pycairo
[pipenv.exceptions.InstallError]:     Running setup.py install for pycairo: started
[pipenv.exceptions.InstallError]:     Running setup.py install for pycairo: finished with status 'error'
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]:    command: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-adj3i4qg
[pipenv.exceptions.InstallError]:        cwd: /tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/
[pipenv.exceptions.InstallError]:   Complete output (17 lines):
[pipenv.exceptions.InstallError]:   running bdist_wheel
[pipenv.exceptions.InstallError]:   running build
[pipenv.exceptions.InstallError]:   running build_py
[pipenv.exceptions.InstallError]:   creating build
[pipenv.exceptions.InstallError]:   creating build/lib.linux-aarch64-3.9
[pipenv.exceptions.InstallError]:   creating build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/__init__.py -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/__init__.pyi -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/py.typed -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:   
[pipenv.exceptions.InstallError]:   running build_ext
[pipenv.exceptions.InstallError]:   Package cairo was not found in the pkg-config search path.
[pipenv.exceptions.InstallError]:   Perhaps you should add the directory containing `cairo.pc'
[pipenv.exceptions.InstallError]:   to the PKG_CONFIG_PATH environment variable
[pipenv.exceptions.InstallError]:   No package 'cairo' found
[pipenv.exceptions.InstallError]:   Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
[pipenv.exceptions.InstallError]:   ----------------------------------------
[pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for pycairo
[pipenv.exceptions.InstallError]:     ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]:      command: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qc0zxiqm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/include/site/python3.9/pycairo
[pipenv.exceptions.InstallError]:          cwd: /tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/
[pipenv.exceptions.InstallError]:     Complete output (19 lines):
[pipenv.exceptions.InstallError]:     running install
[pipenv.exceptions.InstallError]:     /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
[pipenv.exceptions.InstallError]:       warnings.warn(
[pipenv.exceptions.InstallError]:     running build
[pipenv.exceptions.InstallError]:     running build_py
[pipenv.exceptions.InstallError]:     creating build
[pipenv.exceptions.InstallError]:     creating build/lib.linux-aarch64-3.9
[pipenv.exceptions.InstallError]:     creating build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/__init__.py -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/__init__.pyi -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/py.typed -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:     
[pipenv.exceptions.InstallError]:     running build_ext
[pipenv.exceptions.InstallError]:     Package cairo was not found in the pkg-config search path.
[pipenv.exceptions.InstallError]:     Perhaps you should add the directory containing `cairo.pc'
[pipenv.exceptions.InstallError]:     to the PKG_CONFIG_PATH environment variable
[pipenv.exceptions.InstallError]:     No package 'cairo' found
[pipenv.exceptions.InstallError]:     Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
[pipenv.exceptions.InstallError]:     ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qc0zxiqm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/include/site/python3.9/pycairo Check the logs for full command output.
ERROR: Couldn't install package: pycairo
 Package installation failed...
  โ˜ค  โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰ 0/1 โ€” 00:00:10
exiting script ./create_devel_venv.sh
reason: failed to install modules

move plugins out of pyinstaller frozen blob

The pyinstaller frozen blob is getting rather large for a one-file distribution. Consider moving the modules out into a system path and then using sys.path.append('/mypath/scriptlib') to add the modules to the system path.

This would likely only require changing the path in the constants file

Support for epd3in7

I have a 3.7 HAT screen and would love to add support. Would you prefer a modified version of the standard Waveshare py file (modify the actual functions) or an inline interface file that can handle the function calls between the two?

In short, I would love to get this working with my 3.7 screen and am willing to do the work to make that happen. I'm just looking for a preferred direction (if you have one).

AttributeError: 'EPD' object has no attribute 'display'

Raspberry Pi 3 Model B Rev 1.2
Buster
Waveshare 3in7

I am able to run the waveshare demo

I have disabled all plugins so the only thing changed is the display_type

[main]

waveshare display type

display_type = epd3in7

And yet, when I run the executable . . . failure:

$ ./paperpi
Traceback (most recent call last):
File "paperpi/paperpi.py", line 584, in
File "paperpi/paperpi.py", line 546, in main
File "paperpi/paperpi.py", line 293, in setup_display
File "epdlib/Screen.py", line 251, in epd
AttributeError: 'EPD' object has no attribute 'display'
[2366] Failed to execute script paperpi

[It's probably me. Sorry.]

crash when lms_client cannot reach network

unhandled exception when network is unreachable in lms_client plugin

Sep 14 20:20:01 paperpi paperpi[6936]: 20:20:01 QueryLMS:scan_lms:233:INFO - searching for LMS servers for 5 seconds
Sep 14 20:20:01 paperpi paperpi[6936]: [6937] Failed to execute script 'paperpi' due to unhandled exception!
Sep 14 20:20:01 paperpi paperpi[6936]: Traceback (most recent call last):
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 859, in <module>
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 838, in main
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 409, in build_plugin_list
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/library/Plugin.py", line 254, in update
Sep 14 20:20:01 paperpi paperpi[6936]:     is_updated, data, priority = self.update_function(*args, **kwargs)
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/plugins/lms_client/lms_client.py", line 133, in update_function
Sep 14 20:20:01 paperpi paperpi[6936]:     build_lms()
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/plugins/lms_client/lms_client.py", line 102, in build_lms
Sep 14 20:20:01 paperpi paperpi[6936]:     self.my_lms = QueryLMS.QueryLMS(player_name=player_name, handle_requests_exceptions=True)
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 80, in __init__
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 173, in set_server
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 235, in scan_lms
Sep 14 20:20:01 paperpi paperpi[6936]: OSError: [Errno 101] Network is unreachable```

Add 64-bit OS support

Trying to run the program on the new 64-bit Raspbian OS causes the error bash: ./paperpi: No such file or directory as it's looking for the non-existent ld-linux-armhf.so.3 interpreter.
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]

After some troubleshooting, I was able to get it running using the following commands:
sudo dpkg --add-architecture armhf

Which resulted in this error:
./paperpi: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

That was resolved with this command:
sudo apt-get install zlib1g:armhf

Which resulted in this error:

  File "paperpi/paperpi.py", line 29, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "epdlib/__init__.py", line 6, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "epdlib/Block.py", line 14, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "PIL/Image.py", line 89, in <module>
ImportError: libxcb.so.1: cannot open shared object file: No such file or directory
[2447] Failed to execute script 'paperpi' due to unhandled exception!

That was resolved with this command:
sudo apt-get install libxcb1:armhf libxcb1-dev:armhf

This appears to allow the 32-bit compiled version to work as intended with the same results as my locally compiled 64-bit version. I'm not sure if these three commands can just be added to a shell script for running if the compiled version doesn't work or maybe just added to the README.md on here.

garbage collection for cached files

Plugins should be able to clean up their private cache on demand.

add a method to Plugin() class that does garbage collection on cache

write into display loop garbage collection every N refreshes or Y days or something similar.

Change distribution method from Frozen PyInstaller glob

Currently PaperPi is distributed as a single Frozen glob using PyInstaller. This is brittle, large and generally a pain to maintain. It is also not possible to add, test, or adjust plugins without rebuilding the entire project and redistributing it. This isn't ideal.

Finding a new distribution method would be much better.

Paperpi freezing

Hi; I have downloaded paperpi on a raspberry pi 3 using the current outlook rendition. I am operating a waveshare 4.2 screen. Download was fine and set up on Damon. I am running the word clock and phases of the moon. Problem is that the system starts, and works fine for about 12 hours. It then simply freezes; and does not function. I thought it might be a bad download; so I performed a new download with a new SD card. Same problem. I then changed to a different Raspberry Pi 3b that I had sitting around. Same problem. As it starts and functions for 12 hours; I doubt it has anything to do with the wiring. Any ideas? Looks great when operating; however, having to restart it every 12 hours is a non player. Please let me know if there is something else I can do. Thanks.

Update_loop appears to ignore max_refresh value in config file

See issue here from @jhaake2308

As it seems, the config parameter max_refresh (which is set to 30 in my case in paperpi.conf) is ignored. Every four changes there is a hard refresh. See this, the last refresh is done right before the video starts:

edit: video doesnt work, see gif at: https://imgur.com/a/6eoObdo
thank god its 2021, you can pause the gif, move forward, etc.

I am using a daemonized setup, defining max_refresh in /etc/default/paperpi.ini

# CONFIG_VERSION=1
[main]
# waveshare display type use HD for IT8951 displays
display_type = HD
# required vcom value for IT8951 screens
vcom = -2.13
# maximum refresh between total screen clear for HD displays
max_refresh = 30```

is this intentional or did I do this wrong?

Crash when BCM driver is not installed

21:27:38 paperpi:main:643:INFO - ********** PaperPi 0.2.14.3 Starting **********
21:27:38 paperpi:main:645:DEBUG - configuration:
{'main': {'display_type': 'HD', 'vcom': -1.9, 'max_refresh': 4, 'log_level': 'DEBUG', 'splash': 1, 'rotation': 0, 'daemon': False}, 'xPlugin: decimal binary clock': {'layout': 'layout', 'plugin': 'dec_bin_clock', 'refresh_rate': 30, 'min_display_time': 50, '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]'}, 'xPlugin: 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: A Demo Plugin': {'layout': 'layout', 'plugin': 'demo_plugin', 'min_display_time': 30, 'max_priority': 1, 'your_name': 'Slartybartfast', 'your_color': 'chartreuse'}, 'xPlugin: Basic Clock': {'layout': 'layout', 'plugin': 'basic_clock', 'refresh_rate': 30, 'min_display_time': 50, 'max_priority': 2}, 'xPlugin: 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: New Yorker Comic': {'layout': 'layout', 'plugin': 'newyorker', 'day_range': '5 # number of past days to choose from', 'refresh_rate': 120, 'min_display_time': 60, 'max_priority': 2}, 'xPlugin: Librespot': {'layout': 'layout', 'plugin': 'librespot_client', 'refresh_rate': 10, 'max_priority': 0, 'min_display_time': 15, 'player_name': 'SpoCon-Spotify', 'idle_timeout': 10}, 'xPlugin: Reddit Quotes': {'layout': 'layout', 'plugin': 'reddit_quote', 'refresh_rate': 100, 'min_display_time': 50, 'max_priority': 2, 'max_length': 144}, '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: Word Clock': {'layout': 'layout', 'plugin': 'word_clock', 'refresh_rate': 125, 'min_display_time': 255, '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}, 'Plugin: Reddit Quotes': {'layout': 'layout', 'plugin': 'reddit_quote', 'refresh_rate': 100, 'min_display_time': 50, 'max_priority': 2, 'max_length': 144}, '__cmd_line': {'list_plugins': False}}
21:27:38 Screen:_load_hd:399:DEBUG - configuring IT8951 epd
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 648, in main
  File "paperpi/paperpi.py", line 322, in setup_display
  File "epdlib/Screen.py", line 226, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 316, in epd
  File "epdlib/Screen.py", line 406, in _load_hd
  File "IT8951/display.py", line 215, in __init__
RuntimeError: Problem importing EPD interface. Did you build the backend with "pip install ./" or "python setup.py build_ext --inplace"?
[4255] Failed to execute script 'paperpi' due to unhandled exception!

Unable to display plugin.

The time can be displayed, but the plug-in cannot be displayed, and a prompt message appears:
Noplugins are active,check the logs!
raspberry zero 2wh+waveshare b/w 7.5inch(600X384)

executing ./dist/paperpi results in "No such file or directory"

~/Desktop/paperpi/dist/paperpi exists, is attributed executable, and -rwxrwxrwx 1 pi pi 41389340 Feb 27 21:48 paperpi.

attempted to execute via terminal from ~, ~/Desktop, ~/Desktop/paperpi, and ~/Desktop/paperpi/dist

Raspberry pi 3b, Waveshare 10.3+ w/ Raspberry hat - confirmed display functional via windows, confirmed interface correct using https://github.com/GregDMeyer/IT8951

Running Raspbian 11, /proc/version says Linux version 5.10.92-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022

Looking for specific advice for locating logs for daemon instance of paperpi, as well as any advice as to what's not doing the thing.

When starting as a daemon from systemd, no images are shown until first plugin timesout

When starting from systemd at boot, PaperPi may fail to show the splash screen and the first module. This is due to a NoneType object being passed to the epdWrite() function.

This has been exceptionally difficult to debug because it only happens at boot time from systemd. When started from the command line, this problem does not manifest.

Logging shows the image is generated, but fails to pass to the epdWrite() function.

Any help in solving this would be greatly appreciated.

new yorker plugin crash

17:48:10 Block:_calc_maxchar:923:DEBUG - maximum characters per line: 148
17:48:10 Block:_text_formatter:939:DEBUG - formatting string: NONE
17:48:10 Block:_text2image:983:DEBUG - text size: (16, 11)
17:48:10 Block:_text2image:1030:DEBUG - paste coordinates: (5, 5)
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 682, in main
  File "paperpi/paperpi.py", line 431, in build_plugin_list
  File "/tmp/_MEISqIwwY/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEISqIwwY/plugins/newyorker/newyorker.py", line 134, in update_function
    success, my_data, day_range = fetch_comic(day_range)
  File "/tmp/_MEISqIwwY/plugins/newyorker/newyorker.py", line 95, in fetch_comic
    if day_range > len(feed.entries):
TypeError: '>' not supported between instances of 'str' and 'int'
[8750] Failed to execute script 'paperpi' due to unhandled exception!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.