-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime error while 'lv.load_layout' using klayout.lay.LayoutView() #1146
Comments
That means that the stream reader plugins can't be found. Those are shared objects which a located in the deployment file hierarchy. The master in WIP, so please don't expect everything to work out of the box. I'd recomment to try the latest master CI builds: https://github.com/KLayout/klayout/actions/runs/2834848667#artifacts Otherwise, please build from source. Matthias |
I get a similar error with a fairly recent build: https://github.com/KLayout/klayout/actions/runs/3115315370, see:
I do see the plugin in the whl, so maybe there is an issue with the library search path?
|
if I trace the dynamic loader attemps using:
I get can't see it attempting to load anything from Looking at the RPATH from the different plugins, they seems to be referring to some other non-existing path (
I wonder if that's related to the comment in: |
Interestingly the
https://gist.github.com/proppy/765d8d4d782d3aad172c122f8eb201cf
|
Hi @proppy, I just tried to reproduce the problem with the manylinux Python 3.10 wheel from the build mentioned above. But without success (or rather: without fail) :( I used a fresh ubuntu:latest Docker container and system Python3/pip3. I wonder how the RPATH can play a role at all, because when the db module loads the plugins all dependencies should already be satisfied by libraries already loaded. As you observed the db_plugins are not loaded by Python but by the stream engine inside klayout.db. It scans the "db_plugins" folder for shared objects and tries to load these. Here is my LD_DEBUG output with "files":
So, no dependency resolution involved ... Anyway, even then I wonder how LD_DEBUG output continues in your case. Matthias |
Here is some more |
Sorry, I lost this thread. Matthias |
@klayoutmatthias yep, I'm still getting this issue with the newly released klayout 0.28 and colab / python 3.8:
|
Looking at |
Forcing the gds plugin to load with:
does work around the issue:
|
Setting |
Found a cleaner workaround based on #1146 (comment):
|
You're right. But it should be enough do
to enable the stream readers. It does not matter where in the code, you can safely import it always along with So this should work too:
Matthias |
@klayoutmatthias confirmed just importing I'm also curious on how to associated the |
This seems to work assuming that the
|
@klayoutmatthias I think we can close this :) |
Thanks :) |
I followed your code.
I downloaded wheel file from qtless-canvas2 brach action #148.
and installed 'klayout-0.28-cp39-cp39-maylinux_2_17_x86_64.manylinux2014_x86_64.whl'.
My OS is CentOS7
import is ok but I came up with below message.
RuntimeError: Stream has unknown format: ..sample_gds/t10.gds in LayoutViewBase.load_layout
However I opened same gds file using Klayout, It was OK.
't10.gds' was downloaded from 'klayout/tree/master/testdata/gds'
Is there something to do with gds file?
Or have to convert 'gds' file to some proper 'format'?
The qtless-canvas branch now is in a fairly stable state. With the Python wheel available in the Artifacts section you should be able to do something like this without Qt:
Explanation: The "lay" module contains a superset of the layout viewer/edtiro API. Specifically
LayoutView
is a non-Qt class now and offers much of the functionality of LayoutView. Except image export is done via a new class namedPixelBuffer
instead of QImage. The PNG read and write abilities come from libpng. It's also possible to turn an image into a byte string in PNG format as shown in the example above.This however, is just the beginning.
LayoutView
offers a dynamic API which should basically be able to provide background drawing and mouse event simulation which eventually enables zoom, drawing of rulers and even editing the same way you are used from the desktop application. I'm currently evaluation ways how this can be utilized.Matthias
Originally posted by @klayoutmatthias in #1082 (comment)
The text was updated successfully, but these errors were encountered: