xslope 0.1.3__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xslope-0.1.3/xslope.egg-info → xslope-0.1.5}/PKG-INFO +1 -1
- {xslope-0.1.3 → xslope-0.1.5}/xslope/_version.py +1 -1
- {xslope-0.1.3 → xslope-0.1.5}/xslope/mesh.py +26 -6
- {xslope-0.1.3 → xslope-0.1.5/xslope.egg-info}/PKG-INFO +1 -1
- {xslope-0.1.3 → xslope-0.1.5}/LICENSE +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/MANIFEST.in +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/NOTICE +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/README.md +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/pyproject.toml +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/setup.cfg +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/__init__.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/advanced.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/fem.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/fileio.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/global_config.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/plot.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/plot_fem.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/plot_seep.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/search.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/seep.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/slice.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope/solve.py +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope.egg-info/SOURCES.txt +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope.egg-info/dependency_links.txt +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope.egg-info/requires.txt +0 -0
- {xslope-0.1.3 → xslope-0.1.5}/xslope.egg-info/top_level.txt +0 -0
|
@@ -25,12 +25,32 @@ def _get_gmsh():
|
|
|
25
25
|
import gmsh
|
|
26
26
|
_gmsh = gmsh
|
|
27
27
|
except (ImportError, OSError) as e:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
28
|
+
error_msg = str(e)
|
|
29
|
+
error_repr = repr(e)
|
|
30
|
+
# Check for OpenGL library issues (common in Colab/headless environments)
|
|
31
|
+
# Check both str() and repr() to catch all variations, and check exception args
|
|
32
|
+
error_text = error_msg + " " + error_repr
|
|
33
|
+
if hasattr(e, 'args') and e.args:
|
|
34
|
+
error_text += " " + " ".join(str(arg) for arg in e.args)
|
|
35
|
+
if ("libGL" in error_text or "libGLU" in error_text):
|
|
36
|
+
help_msg = (
|
|
37
|
+
"gmsh is required for mesh generation but could not be imported due to missing OpenGL libraries. "
|
|
38
|
+
"This is common in headless environments like Google Colab.\n\n"
|
|
39
|
+
"To fix this in Google Colab, install the required system libraries first:\n"
|
|
40
|
+
" !apt-get update && apt-get install -y libgl1-mesa-glx libglu1-mesa\n"
|
|
41
|
+
"Then install gmsh:\n"
|
|
42
|
+
" !pip install gmsh\n\n"
|
|
43
|
+
"For other headless environments, install the appropriate OpenGL libraries for your system.\n"
|
|
44
|
+
f"Original error: {e}"
|
|
45
|
+
)
|
|
46
|
+
else:
|
|
47
|
+
help_msg = (
|
|
48
|
+
"gmsh is required for mesh generation but could not be imported. "
|
|
49
|
+
"If you only need limit equilibrium analysis, you can ignore this. "
|
|
50
|
+
"To use FEM features, install gmsh: pip install gmsh\n"
|
|
51
|
+
f"Original error: {e}"
|
|
52
|
+
)
|
|
53
|
+
raise ImportError(help_msg) from e
|
|
34
54
|
return _gmsh
|
|
35
55
|
|
|
36
56
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|