Problem getting started using a example

I am quite new to using OpenGeoSys & trying to run this benchmark using jupyterlab in a conda environment

I downloaded the 3D_Beier_sandbox directory from gitlab but i am encountering an error from just loading the project

import ogstools as ot
import os

out_dir = Path(os.environ.get("OGS_TESTRUNNER_OUT_DIR", "_out"))
if not out_dir.exists():
    out_dir.mkdir(parents=True)

model = ot.Project(input_file="beier_sandbox.prj", output_file="beier_sandbox.prj")

I am getting a attribute error

AttributeError                            Traceback (most recent call last)
Cell In[5], line 1
----> 1 model = ot.Project(input_file="beier_sandbox.prj", output_file="beier_sandbox.prj")

AttributeError: module 'ogstools' has no attribute 'Project'

any guidance would be greatly appreciated

Hi Itchong1,

which version of OGSTools do you use?

The problem might be that some import inside OGSTools fails and therefore Project is missing from ogstools in the end.

Could you try please try the following in the script:

import ogstools.ogs6py as ogs6py

...

model = ogs6py.Project(...)

With OGSTools 0.5.0 (current release) the situation might have improved. Or at least some import errors might be shown.

I hope that helps.

Best regards,
Christoph

I was using ogstools 0.3.0. I was unable to conda update it to 0.5.0 without ogs 6.5.4. The alternative ogs6py import did not work too.

The solution was to not use conda at all. I used pip install for ogstools 0.5.0 & ogs 6.5.4 which resolved the attribute error.

Conda now has the latest versions OGSTools 0.5.0 and OGS 6.5.4, but for Linux and macOS only at the moment.