Closed cheng1214 closed 2 years ago
I just found that in my KLayout environment, __file__ returns 'path' , not path.
That is the reason why os.path.realpath(__file__) return invalid path.
But I still don't know why this weird problem happens....
Hi Rui,
In the KLayout macro window, using the Python interpreter, can you please try this?
Turn on debugging mode, by clicking on the little bug (3rd from right icon). If you get errors, you can debug them this way.
Open the SiEPIC_EBeam_Library.lym file and run it. Then:
import os os.path.realpath(file)
'/Users/lukasc/SiEPIC_EBeam_PDK/klayout_dot_config/tech/EBeam/pymacros/SiEPIC_EBeam_Library.lym’
Your error might be because of the space in your username, where Windows/KLayout/Python aren’t handling it correctly.
Good luck! Lukas
Hi Lukas,
Thanking you very much! I think you are right that the issue is due to the space of username. I will try to fix it.
Best Regards, Rui
@cheng1214 let me know if that fixes it? This might be a bug in KLayout rather than SiEPIC-Tools, so perhaps you could report it to github.com/klayout/klayout?
thanks
@lukasc-ubc Hi Lukas,
This issue doesn't exist in another laptop of mine where the username has no name psace
I have fixed it by removing " ' " and " ' " at both the end of the path string, i.e., "file[1:-1]", such that it becomes valid.
I have reported the issue in KLayout (https://github.com/KLayout/klayout/issues/946)
Hi All.
My KLayout cound not find SiEPIC EBeam library and Beta library (i.e., there is no such libraries in Instance).
Also, now when I ran SiEPIC_EBeam_library.py or SiEPIC_EBeam_library_Beta.py in Macro, it threw an error "[WinError 123] Syntax error in file name, folder name or volume label : "C:\Users\RuiCheng\AppData\Roaming\KLayout\'C:\Users\Rui Cheng\KLayout\salt\siepic_ebeam_pdk\klayout_dot_config\tech\EBeam\pymacros\pcells_EBeam"
It seems that the path string is wrong.
I have reinstalled both the KLayout and SiEPC Tools and PDK but still doesn't work
I wondered if anyone has an idea why the path could be incorrect like that? Thanking you!