duggan / inkystock

A tiny, hackable, Raspberry Pi Zero powered e-ink display for cryptocurrency, stocks and more.
GNU General Public License v3.0
12 stars 1 forks source link

libxcb.so.1 #2

Closed BramvdHoek closed 3 years ago

BramvdHoek commented 3 years ago

When I follow the installation instructions, upon executing ./run.sh the code fails to execute:

root@PiZero:~/inkystock# ./run.sh

Traceback (most recent call last): File "main.py", line 7, in from inkystock.paint import Pillow

File "/root/inkystock/inkystock/paint.py", line 11, in from PIL import ImageFont as PILFont, Image as PILImage, ImageDraw as PILDraw

File "/usr/local/lib/python3.7/dist-packages/PIL/ImageFont.py", line 34, in from . import Image, features

File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 94, in from . import _imaging as core

ImportError: libxcb.so.1: cannot open shared object file: No such file or directory root@PiZero:~/inkystock#

duggan commented 3 years ago

Hey @BramvdHoek, thanks, thought I'd covered all the dependencies, but must have missed one.

Can you try installing libxcb1-dev and see if that does the trick?

apt install -y libxcb1-dev

BramvdHoek commented 3 years ago

Started with a fresh install. That did the trick! Btw; could you provide some additional information to show general stock data? E.g. AAPL?

duggan commented 3 years ago

Sure, looks like I forgot to document that!

To get you started, a config for stocks would look like:

[Main]
currency = EUR
stock = AAPL
database = sqlite:///data/inkystock.db
provider = IEX

[IEX]
token = YOUR_IEX_TOKEN

# Other config sections below, etc
...
BramvdHoek commented 3 years ago

Sure, looks like I forgot to document that!

To get you started, a config for stocks would look like:

[Main]
currency = EUR
stock = AAPL
database = sqlite:///data/inkystock.db
provider = IEX

[IEX]
token = YOUR_IEX_TOKEN

# Other config sections below, etc
...

[IEX] token = sk_heresomerandomnumbers

Guess I use it wrong:

Traceback (most recent call last): File "main.py", line 119, in main() File "main.py", line 37, in main config = Config(env_vars=env_vars, path=args.config) File "/home/pi/inkystock/inkystock/config.py", line 111, in init self.iex = IEXConfig(**self.config['IEX']) File "/usr/lib/python3.7/configparser.py", line 958, in getitem__ raise KeyError(key) KeyError: 'IEX'

duggan commented 3 years ago

That looks like it's not finding the [IEX] section, which is strange (might be formatting).

Can you post your complete config.ini (without the token, of course)?

Here's my own complete working config.ini for AAPL -> EUR without the token:

[Main]
currency = EUR
stock = AAPL
database = sqlite:///data/inkystock.db
provider = IEX

[IEX]
token = pk_TOKEN_GOES_HERE

[Mascot]
increasing = ./resources/pixelcat/pixelcat_cool.png
decreasing = ./resources/pixelcat/pixelcat_worried.png
static = ./resources/pixelcat/pixelcat_sleeping.png

[Fonts]
ticker = ./resources/fonts/04B_03__.TTF
ticker_size = 8
symbol = ./resources/fonts/04B_21__.TTF
symbol_size = 10
headline = ./resources/fonts/04B_30__.TTF
headline_size = 30
statusbar = ./resources/fonts/CozetteVector.ttf
statusbar_size = 12
chart = ./resources/fonts/04B_03__.TTF
chart_size = 5.2
BramvdHoek commented 3 years ago

Was indeed a formatting error. Replaced it with above and it works perfectly. Thanks!