Uploading .stix file into a DstabilityModel (Geolib)

Results is a string (contents of the .sld file). The output_model is a direct inheritance of the DSettlementModel of the GeoLib. only certain methods have been added.
Replacing this results in the same error.

I am using geolib: d-geolib==0.1.6.

Not sure what other settings could be different to mine. As I think the code related to transferring the str to the Geolib Model is simular…

@mweehuizen I think it could have something to do with using Python 3.10. Which had some mayor changes in Typing. I don’t use any other features of 3.7+, so I thought this wouldn’t give any problem.s Installing 3.7 now to check if this was the case

Hi Johan,

I did some in depth investigation and it appears that Geolib (both 0.1.6 and 0.1.7) is not compatible with python 3.10.
I have ran the above code with python 3.7 and 3.10 and the error occurs only on python 3.10.

But i am confused by the fact that it works locally with you.
What version of python are you running ‘locally’ and with what version is the viktor-cli configured?

The first one can be checked by running python from cmd:

The second can be checked in c:\Users<your_username>.viktor\configuration

You can change you local python version used by viktor following these steps:

  1. Install different python version (bijv. 3.7.9)
  2. Change python_path using viktor-cli.exe configure and change python path to the correct python folder
  3. remove the \venv\ folder from the app folder
  4. run viktor-cli.exe install

few minutes ahead of me :wink:

1 Like

Hi all,

Just received a link that there is a new Geolib release - v.0.1.8:
Release v0.1.8 · Deltares/GEOLib (github.com)

One of the features is that support for Python 3.10 is added. Good luck with programming @Johan_Tuls !


Hi @yida.tao ,

Thanks for sharing.
Pip still only contains v0.1.7. Even though v0.1.8 release is present on github.com.

Hopefully Deltares starts putting effort to make Geolib up to date with all D-Series / Python versions. Personally I think we should sign a petition with all contractors, engineering companies and platforms to request this.

I will suggest this to be set on the Agenda of the next DEC meeting also.

Hi Johan,

I already started a ‘discussion’ on the github and got a response:

Hi @Mbweehuizen, yes it will be! The person who is authorized to do this is currently on holiday, we will upload it to PyPi when he returns and make sure we can do it faster next time

So v0.1.8 will be on PyPi soon.

Furthermore, I agree with your second point