devbisme / skidl

SKiDL is a module that extends Python with the ability to design electronic circuits.
https://devbisme.github.io/skidl/
MIT License
1.06k stars 119 forks source link

[SKiDL BUG] Error in Jupyter Notebook: Could not load KiCad schematic library (works on terminal) #136

Closed eMPee584 closed 3 years ago

eMPee584 commented 3 years ago

When trying to run the example code from a Jupyter Notebook, I hit this issue that even though the kicad-symbols are accessible and the path is set, skidl chokes on them:

image

It works in ipython on a terminal: image

This is in a rattydave/jupyterhub docker where kicad-symbols is installed via apt and skidl via conda.. what might be happening here :thinking:

devbisme commented 3 years ago

Seems to work for me in Jupyter. Check your lib_search_paths and make sure the kicad entry is pointing to the right directory.

jupyter_screenshot .

eMPee584 commented 3 years ago

Aha, thanks for the cue 😀 .. after having a look at lib_search_paths code I realized setting the environment variable from inside the notebook is too late, skidl already had tried to parse it.. restarting the container so that the /etc/profile.d/kicad-symbols_path_for_skidl.shI created was evaluating at Jupyter startup fixed the issue.