Giter Site home page Giter Site logo

Comments (16)

avandeputte avatar avandeputte commented on June 3, 2024 1

It is working now... I am not entirely sure why as I don't thing I changed anything really. I did do some edits on the yaml file here and there and saved it multiple times but I ended up with the same values as I started with. Perhaps some sort of character encoding issue in the yaml got fixed somehow. Who knows.

Anyway, thanks for your help. I am looking forward to really play with it and integrate it with my home assistant instance too!

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

That's the same as #4. I should update the code to work with modern versions of voluptuous as a better fix.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

Thanks, downgraded the library per #4 and I got past that issue now. I am bit confused how the install succeeded considering you have it set to ====0.9.3 in requirements.txt.

Now it's failing with another error:

File "/usr/local/lib/python3.5/dist-packages/infopanel-0.1-py3.5.egg/infopanel/sprites.py", line 98, in apply_config
self.font = helpers.load_font(conf['font_name'])
File "/usr/local/lib/python3.5/dist-packages/infopanel-0.1-py3.5.egg/infopanel/helpers.py", line 34, in load_font
font.LoadFont(os.path.join(FONT_DIR, name)) # slow.
File "graphics.pyx", line 32, in rgbmatrix.graphics.Font.LoadFont
Exception: Couldn't load font /root/fonts/5x8.bdf

Which I really don't understand, because the font is there....

root@raspberrypi: /infopanel/infopanel/tests# head /root/fonts/5x8.bdf
STARTFONT 2.1
COMMENT $Id: 5x8.bdf,v 1.32 2006-01-05 20:03:17+00 mgk25 Rel $
COMMENT Send bug reports to Markus Kuhn http://www.cl.cam.ac.uk/~mgk25/
FONT -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO10646-1
SIZE 11 75 75
FONTBOUNDINGBOX 5 8 0 -1
STARTPROPERTIES 22
FONTNAME_REGISTRY ""
FOUNDRY "Misc"
FAMILY_NAME "Fixed"
root@raspberrypi:~/infopanel/infopanel/tests#

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

I have a better fix in the works for the voluptuous thing. I think it errored out in the install but somehow fell back on the newer version you have installed.

What user is the infopanel running as? If it's pi or something else other than root it may have trouble reading the fonts in /root/fonts.

What do you get if you just run ls /root/fonts from the same user that runs infopanel?

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

I am doing everything as root...

root@raspberrypi: # ls -al /root/fonts
total 7256
drwxrwxrwx 2 root root 4096 Dec 16 21:33 .
drwx------ 11 root root 4096 Dec 16 21:52 ..
-rwxrwxrwx 1 root root 974681 Dec 16 21:33 10x20.bdf
-rwxrwxrwx 1 root root 94333 Dec 16 21:33 4x6.bdf
-rwxrwxrwx 1 root root 194747 Dec 16 21:33 5x7.bdf
-rwxrwxrwx 1 root root 154919 Dec 16 21:33 5x8.bdf
-rwxrwxrwx 1 root root 211073 Dec 16 21:33 6x10.bdf
-rwxrwxrwx 1 root root 549703 Dec 16 21:33 6x12.bdf
-rwxrwxrwx 1 root root 159441 Dec 16 21:33 6x13B.bdf
-rwxrwxrwx 1 root root 512118 Dec 16 21:33 6x13.bdf
-rwxrwxrwx 1 root root 95801 Dec 16 21:33 6x13O.bdf
-rwxrwxrwx 1 root root 144785 Dec 16 21:33 6x9.bdf
-rwxrwxrwx 1 root root 124748 Dec 16 21:33 7x13B.bdf
-rwxrwxrwx 1 root root 400761 Dec 16 21:33 7x13.bdf
-rwxrwxrwx 1 root root 103390 Dec 16 21:33 7x13O.bdf
-rwxrwxrwx 1 root root 128518 Dec 16 21:33 7x14B.bdf
-rwxrwxrwx 1 root root 327838 Dec 16 21:33 7x14.bdf
-rwxrwxrwx 1 root root 141768 Dec 16 21:33 8x13B.bdf
-rwxrwxrwx 1 root root 459959 Dec 16 21:33 8x13.bdf
-rwxrwxrwx 1 root root 160613 Dec 16 21:33 8x13O.bdf
-rwxrwxrwx 1 root root 270622 Dec 16 21:33 9x15B.bdf
-rwxrwxrwx 1 root root 765675 Dec 16 21:33 9x15.bdf
-rwxrwxrwx 1 root root 133756 Dec 16 21:33 9x18B.bdf
-rwxrwxrwx 1 root root 835008 Dec 16 21:33 9x18.bdf
-rwxrwxrwx 1 root root 2405 Dec 16 21:33 AUTHORS
-rwxrwxrwx 1 root root 145955 Dec 16 21:33 clR6x12.bdf
-rwxrwxrwx 1 root root 234648 Dec 16 21:33 helvR12.bdf
-rwxrwxrwx 1 root root 15259 Dec 16 21:33 README
-rwxrwxrwx 1 root root 652 Dec 16 21:33 README.md
-rwxrwxrwx 1 root root 19964 Dec 16 21:33 tom-thumb.bdf
root@raspberrypi:~#

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

The only thing I did do to the test_config.yaml is that I put the full path instead of the $ variable. Is that a problem somehow?

global:
font_dir: /root/fonts

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

No that's no problem, you can put the path directly in like that. It's very strange that you're getting that error.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

I did have some mess ups / failed installs because of python vs python3. Might be time to start fresh with a new raspbian image.

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

The voluptuous error is fixed in e858e0e at least.

For what its worth I just installed it in a fresh Raspbian image and updated the docs a bit to get over a few hurdles people have been reporting.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

Are you installing the latest rpi-rgb-led-matrix from hzeller's github, or are you using the adafruit installer which actually downloads an older version from hzeller's github? Just wondering, because I am still struggling to get this to work.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

Sorry to bother you, I am on my third complete fresh install of raspbian... Last couple times I can't get past this error:

root@raspberrypi: # python -m infopanel --config test.yaml
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/infopanel-0.1-py2.7.egg/infopanel/main.py", line 4, in
driver.run()
File "/usr/local/lib/python2.7/dist-packages/infopanel-0.1-py2.7.egg/infopanel/driver.py", line 220, in run
disp = display.display_factory(conf)
File "/usr/local/lib/python2.7/dist-packages/infopanel-0.1-py2.7.egg/infopanel/display.py", line 151, in display_factory
options = rgbmatrix_options_factory(config['RGBMatrix'])
File "/usr/local/lib/python2.7/dist-packages/infopanel-0.1-py2.7.egg/infopanel/display.py", line 142, in rgbmatrix_options_factory
options.led_pixel_mapper = config['led-pixel-mapper']
AttributeError: 'rgbmatrix.core.RGBMatrixOptions' object has no attribute 'led_pixel_mapper'

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

I'm using the latest and greatest rpi-rgb-led-matrix library which will get you around that error. That attribute was apparently added in a recent version and due to a different request I added it as an option. Perhaps I can find a way to be backward compatible if it's easier to use the adafruit installer (I didn't know about that). If you just clone the base library and make/make install it and the python bindings that should get you around that.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

Well, I get this error with the latest and greatest... FYI, I use the following shell scripts to handle all the steps as I understand them. And eventhough the matrix library is getting build for both python 2 and python 3, I am only using python 2 for your program. Is there anything below that seems wrong to you?

#!/bin/bash

apt-get update
apt-get upgrade

apt-get install -y --force-yes python-dev python-pillow python3-dev python3-pillow libyaml-dev python-setuptools python3-setuptools git python-matplotlib python3-matplotlib

# delete previous installs directories
rm -Rf rpi-rgb-led-matrix
rm -Rf infopanel
# download fresh copies
git clone https://github.com/hzeller/rpi-rgb-led-matrix.git
git clone https://github.com/partofthething/infopanel.git


cd rpi-rgb-led-matrix
# install for Python 2.7...
make clean
make build-python HARDWARE_DESC=adafruit-hat-pwm
make install-python HARDWARE_DESC=adafruit-hat-pwm

# Do over for Python 3...
make clean
make build-python HARDWARE_DESC=adafruit-hat-pwm PYTHON=$(which python3)
make install-python HARDWARE_DESC=adafruit-hat-pwm PYTHON=$(which python3)

# install infopanel
cd ../infopanel
python setup.py install

from infopanel.

partofthething avatar partofthething commented on June 3, 2024

I'm so sorry, looks like this is my fault. Your installation looks right to me. I just pushed 6e67908 which should fix the issue. I had a request to add this option I didn't test it properly and now I've reverted it.

from infopanel.

avandeputte avatar avandeputte commented on June 3, 2024

No worries, that's part of the fun of it :)

Now I am back to this error:

font.LoadFont(os.path.join(FONT_DIR, name)) # slow.
File "graphics.pyx", line 32, in rgbmatrix.graphics.Font.LoadFont
Exception: Couldn't load font /root/rpi-rgb-led-matrix/fonts/5x8.bdf

Now more investigating what is going on...

from infopanel.

climy avatar climy commented on June 3, 2024

I had very similar font trouble and it's working now. Try running as root. Remove sudo when you run infopanel as instructed again. Put test_config.yaml into /root/.infopanel/

Make sure you set the environment variable $export RPI_RGB_LED_MATRIX=/home/pi/

from infopanel.

Related Issues (20)

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.