plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
Other
363 stars 36 forks source link

Error Kaleido: not works when uwsgi start as a systemd service and property works when uwsgi start as a command in virtual environment #96

Closed PavelSkripko closed 2 months ago

PavelSkripko commented 3 years ago

Errors

Good day! Can you help me? This error occurs when i save the chart image to a file (jpeg). In this case, the error occurs only when using uwsgi as a service (sistemd). If i run uwsgi as a command in a virtual environment, then app works ok. Kaleido is installed in a python virtual environment.

System: kaleido Version: 0.2.1 python 3.6.8 centos 8

jonmmease commented 3 years ago

Hi @PavelSkripko, this isn't an error I've seen before, but it looks like the root cause is that the system call to launch kaleido can't find the dirname command. So, I'd suggest doing some research on whether there's something special that you need to do get this command on your path when running under systemd.

STEdyd666 commented 3 years ago

Hi @PavelSkripko, have you included the system path in the Environment directive in your service unit? I had the same issue because my service was configured to look only in a specific anaconda environment, which does not include the dirname command.

By changing the line:

Environment="PATH=/home/user/anaconda3/bin:$PATH"

to:

Environment="PATH=/home/stef/anaconda3/bin:/local/bin:/bin:/usr/bin:$PATH"

it works like a charm.

gvwilson commented 2 months ago

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson