equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
110 stars 58 forks source link

Solve Github CI issues with Windows and TCL #1239

Closed jcrivenaes closed 2 months ago

jcrivenaes commented 2 months ago

In PR #1238, we encounter CI fails for latest and python 3.12. It says typically:

INFO     xtgeo.surface.regular_surface:regular_surface.py:2747 Infotext is <Method: trilinear, window>
=========================== short test summary info ===========================
FAILED tests/test_surface/test_regular_surface_vs_cube.py::test_slice_attr_window_max_w_plotting - _tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    {C:\hostedtoolcache\windows\Python\3.8.10\x64\tcl\tcl8.6}

C:/hostedtoolcache/windows/Python/3.8.10/x64/tcl/tcl8.6/init.tcl: couldn't read file "C:/hostedtoolcache/windows/Python/3.8.10/x64/tcl/tcl8.6/init.tcl": No error
couldn't read file "C:/hostedtoolcache/windows/Python/3.8.10/x64/tcl/tcl8.6/init.tcl": No error
    while executing
"source C:/hostedtoolcache/windows/Python/3.8.10/x64/tcl/tcl8.6/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"

This probably means that Tcl wasn't installed properly.

This may be a blocker in coming PR' and hence need a quick solution

jcrivenaes commented 2 months ago

Need to reopen issue. There are still test failures (randomly), e.g. https://github.com/equinor/xtgeo/actions/runs/10755464256/job/29827185559

I tried this solution MPLBACKEND=Agg >> $GITHUB_ENV but problem seems to remain.