Skip to content

show meaningfull error message when MDSPLUS_MODELS_PATH is not set#49

Merged
SimonPinches merged 1 commit intoiterorganization:developfrom
prasad-sawantdesai:fix/warn-user-about-missing-env-variable-MDSPLUS_MODELS_PATH
Apr 15, 2026
Merged

show meaningfull error message when MDSPLUS_MODELS_PATH is not set#49
SimonPinches merged 1 commit intoiterorganization:developfrom
prasad-sawantdesai:fix/warn-user-about-missing-env-variable-MDSPLUS_MODELS_PATH

Conversation

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator

No description provided.

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator Author

Closes #46

Copy link
Copy Markdown
Contributor

@SimonPinches SimonPinches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator Author

prasad-sawantdesai commented Apr 14, 2026

from imas_core import _al_lowlevel as al
from imas_core import imasdef

al.imas_core_config_enable_exceptions()
try:
    status, de_ctx = al.al_begin_dataentry_action("imas:mdsplus?path=./testdb_create", imasdef.FORCE_CREATE_PULSE)
    print(f"Created pulse OK, de_ctx={de_ctx}")
    al.al_close_pulse(de_ctx, imasdef.CLOSE_PULSE)
except Exception as exc:
    print(f"ERROR: {exc}")
$ unset MDSPLUS_MODELS_PATH
]$ python test_mdsplus_create.py
ERROR: b'al_begin_dataentry_action: [ALBackendException = MDSPLUS_MODELS_PATH is not set. Set it to the MDSplus models directory (e.g. export MDSPLUS_MODELS_PATH=/path/to/models/mdsplus) before creating a pulse file.]'
Error status=-3

@SimonPinches SimonPinches merged commit b9f3fc1 into iterorganization:develop Apr 15, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants