plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
MIT License
378 stars 38 forks source link

Is kaleido using mathjax from the internet ? #67

Closed AbdealiLoKo closed 3 years ago

AbdealiLoKo commented 3 years ago

Hi, more of a question based on something I saw in my logs while evaluating kaleido.

I see a process:

./bin/kaleido --no-sandbox --allow-file-access-from-files --disable-breakpad plotly --disable-gpu \
  --plotlyjs='/python/venv/lib/python3.6/site-packages/plotly/package_data/plotly.min.js' \
  --mathjax='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js'

Here I see that plotly js is linked to a locally installed plotlyjs. But mathjax is using a CDN on the internet.

We are looking to deploy this on a machine with no internet access. So, question: Does kaleido use the CDN and is it trying to access the internet ? If yes - Is there any way to disable it ?

jonmmease commented 3 years ago

@AbdealiJK, yes the default behavior is to look for MathJax at this CDN location. You can customize this path using the mathjax scope property. If you're hosting your own build of MathJax in the offline environment you can set it to your own URL string, or you can set it to None to disable MathJax (math typsetting) support in the exported images.

import plotly.io as pio
pio.kaleido.scope.mathjax = None

Hope that helps

AbdealiLoKo commented 3 years ago

Awesome. Thanks @jonmmease Appreciate the example on how to disable it - will use that until I need mathjax support

The-uyu commented 1 year ago

when i run a project i got this error 1699586374702 do you ever meet this problem ?and are there anyway to fix it?thank you so much if you can give me some help~