Closed bartvpelt closed 1 year ago
Well, this is embarrassing. After spending multiple hours on this and eventually posting this issue, it took me only five minutes to look at the pip install output again and notice that the gdspy built actually did fail. As a result, SiPANN also did not install, oops...
If this is the root cause of my error, it's weird that it surfaces as an AttributeError on ysplitter.component. An ImportError would have been more helpful here for those just setting up simphony, maybe there's room for improvement here.
I'll see if installing gdspy properly fixes the issue.
Thanks for the heads up, @bartvpelt. I'll take a look at the errors raised and see if I can make it more informative.
Hello,
Thanks for this issue, we can set it so that it throws an error if gdsfactory is not installed. Are you using the latest version of gdsfactory? Note that the latest version uses gdstk, and you shouldn't get errors installing that.
@SkandanC This file is simply a example file, correct? Because simphony doesn't depend on gdsfactory unless you want to use this feature, right? Perhaps the example script alone should do an import check. Also, in the "extras_require" in the setup script, perhaps we specify a minimum version of gdsfactory.
@bartvpelt One of the things about gdsfactory is that it is incredibly...unstable? It's constantly getting updates and moves so fast from version to version, it can sometimes be hard to keep up. (Just look at the release history on PyPI.) Great software, just in a constant state of flux.
I'm using gdsfactory version 6.36.1 and gdstk version 0.9.36. I can import both just fine, as indicated by the _has_gf flag. Whether my missing SiPANN and gdspy are the root cause of the problem is still a question to me. When I get approval to compile gdspy from source I'll let you know whether it gets solved.
I could try reverting to an older version of gdsfactory, maybe an update broke something. What is the latest version that you've tested, 6.36.1?
This file is simply a example file, correct? Because simphony doesn't depend on gdsfactory unless you want to use this feature, right? Perhaps the example script alone should do an import check. Also, in the "extras_require" in the setup script, perhaps we specify a minimum version of gdsfactory
Yep, but I don't think we need to specify a minimum version, the recommended version to use is always the latest, and using an older version would be not ideal since its very different from the newer version.
Whether my missing SiPANN and gdspy are the root cause of the problem is still a question to me. Unless you are using SiPANN components, it's not.
This example fails to run, console output shown below.
The issue seems to be that none of the defined siepic elements have a 'component' attribute. Looking at the source code the cause for this seems to be that _has_gf = False, this flag is set by the snippet below.
Manually running this snippet, I'm getting _has_gf = True, so I'm kind of confident that my gdsfactory setup works fine. Is there a bug in the current version of the example, or is my installation bugged?
Kind regards