OpenGeode-GeosciencesIO
raw JSON → 5.8.13 verified Fri May 01 auth: no python
Input/Output formats for geosciences within the OpenGeode framework, including reading/writing geosciences data formats. Current version 5.8.13. Released regularly alongside OpenGeode core.
pip install opengeode-geosciencesio Common errors
error ModuleNotFoundError: No module named 'opengeode_geosciencesio' ↓
cause Trying to import the package using the PyPI distribution name with underscores instead of the proper import path.
fix
Use
from opengeode import GeosciencesIO instead. error ImportError: cannot import name 'GeosciencesIO' from 'opengeode' ↓
cause The opengeode-geosciencesio package is not installed, even though opengeode-core may be installed.
fix
Run
pip install opengeode-geosciencesio. error AttributeError: module 'opengeode' has no attribute 'io' ↓
cause In older versions of opengeode-core, the IO subpackage may not be loaded if the IO packages are not imported explicitly.
fix
Ensure you import GeosciencesIO or another IO class directly:
from opengeode import GeosciencesIO. The 'io' submodule is not exposed by default. error TypeError: load() missing 1 required positional argument: 'filename' ↓
cause Omitting the filename argument when calling GeosciencesIO.load().
fix
Provide the filename:
GeosciencesIO.load('file.vtu'). error FileNotFoundError: [Errno 2] No such file or directory: 'model.vtu' ↓
cause The file path is incorrect or the file does not exist.
fix
Double-check the file path and ensure it is accessible.
Warnings
gotcha The library is a namespace package; import from 'opengeode', not 'opengeode_geosciencesio'. The underlying package name does not correspond to the import path. ↓
fix Use `from opengeode import GeosciencesIO` after installing opengeode-geosciencesio.
breaking In version 5.x, the submodule structure was reorganized. The old import pattern `from opengeode.io.geosciencesio import ...` may break. ↓
fix Use `from opengeode import GeosciencesIO` for the main IO class, or `from opengeode.io.geosciences import GeosciencesIOLibrary` for the format-specific library.
deprecated The package name 'opengeode-geosciencesio' is deprecated in favor of using the umbrella 'opengeode' package that aggregates all IO modules. However, the PyPI package still exists. ↓
fix Install opengeode-geosciencesio as a dependency; import via 'opengeode'.
gotcha The library depends on opengeode-core, but pip does not automatically install it. You must install opengeode-core separately if not already present. ↓
fix Run `pip install opengeode-core` before or alongside opengeode-geosciencesio.
Imports
- GeosciencesIO wrong
from opengeode_geosciencesio import GeosciencesIOcorrectfrom opengeode import GeosciencesIO - GeosciencesIOLibrary wrong
from opengeode_geosciencesio import GeosciencesIOLibrarycorrectfrom opengeode.io.geosciences import GeosciencesIOLibrary
Quickstart
from opengeode import GeosciencesIO
# Load a geology model (e.g., in VTK format)
model = GeosciencesIO.load('model.vtu')
print(model)