Closed mabe2312 closed 3 years ago
Hi,
In order to make testing easier and certain types of loading faster, the C++ bits of segyio is loaded on use, and not in import. Loading on import is fine for the pypi packages, but does give a few extra issues in some very specific (and somwhat useful) scenarios. Unfortunately, that also triggers the error you see in some cases.
You can explicitly load the C++ module by doing import segyio._segyio, or by going through the file handle. Which example did you struggle with?
Hello Jørgen
Sorry for the very late reply, i totally missed it in my inbox.
I messed around with a few different methods of installing the segyio package and finally one of them, i cant recall which exactly, no longer produced the described error.
Thank you for your message.
Kind regards Simon Mabe
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Den man. 22. feb. 2021 kl. 09.57 skrev Jørgen Kvalsvik < @.***>:
Hi,
In order to make testing easier and certain types of loading faster, the C++ bits of segyio is loaded on use, and not in import. Loading on import is fine for the pypi packages, but does give a few extra issues in some very specific (and somwhat useful) scenarios. Unfortunately, that also triggers the error you see in some cases.
You can explicitly load the C++ module by doing import segyio._segyio, or by going through the file handle. Which example did you struggle with?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/equinor/segyio/issues/502#issuecomment-783210788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS57CHRWWP4UCCIU44KBVWLTAIMAXANCNFSM4X7SMHLA .
Good, thanks! Then I'm considering this solved.
Hello segyio team
I am trying to familiarize myself with segyio but i am met with the following message:
cannot import name '_segyio' from 'segyio'
Whenever i try to run the examples described on the github page
Any help would be much appreciated