Fix for: Circuit Simulation: OPICS - "Unable to import the library: opics_ebeam" #303 #234
+70
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to same issue by another user: SiEPIC/SiEPIC_EBeam_PDK#303 (comment)
(the code change needed to be done here)
Hi Lukas,
When installing KLayout, SiEPIC-tools and SiEPIC_EBeam_PDK, there was a bug on both Windows 11 (AMD 5900X and Radeon 7900 XTX) and MacOS (M1 MBP). The error was as follows:
Whenever I:
Exception: Unable to import the library: opics_ebeam
C:\Users\maxzh\KLayout\salt\siepic_tools\python\SiEPIC\opics\utils.py:312
C:\Users\maxzh\KLayout\salt\siepic_tools\python\SiEPIC\opics_netlist_sim.py:90
C:/Users/maxzh/KLayout/salt/siepic_tools/pymacros\Keybindings\Simulation\circuit_simulation OPICS.lym:7
Seems to me like the code is trying to import the package 'ebeam' specified in 'catalogue.yaml', but either never downloads it, or isn't using the 'ebeam' data provided by the PDK. The default directory where utils.py tries to find the package seems to be 'SiEPIC/opics/libraries', but that isn't the install location of the ebeam PDK when downloading using 'salt'. I tried simply copy and pasting the package to SiEPIC/opics/libraries, but that gave a new set of errors. I wrote some code to check and import from the correct directories. I agree it is not the most elegant solution, but I simply needed a working version to complete the passives workshop. Here it is!
Thank you,
Max.