-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Describe the bug
Using the helicsFederateGetTag
Python API function fails because the error object was not passed to the C function.
This can be fixed easily by adding the error object as is done in the helicsFederateSetTag function. However, other C API GetTag functions do not require the error argument, which suggests that it may be an error for the C API to require it.
To Reproduce
Use the helicsFederateGetTag function.
Steps to reproduce the behavior:
- Modify the helics user guide example such as fundamental_combo.
- Add tags to the ChargerConfig.json.
"tags": {
"Level": 3
},
- Add a line to Charger.py to get the tag using helicsFederateGetTag(fed, "Level")
logger.debug(f"Charger Level: {h.helicsFederateGetTag(fed, "Level")}")
- Run the case.
TypeError: 'char *(*)(void *, char *, HelicsError *)' expects 3 arguments, got 2
Environment (please complete the following information):
- Operating System: Ubuntu Linux via Windows Subsystem for Linux (WSL)
- Installation: pip install helics
- helics and pyhelics version:
helics --version
helics, version 3.6.1
Python HELICS version 3.6.1
HELICS Library version 3.6.1 (2025-02-24)
Share the output of the following:
$ python -c "import helics as h; import json; print(json.dumps(h.helicsGetSystemInfo(), indent=4, sort_keys=True))"
as h; import json; print(json.dumps(h.helicsGetSystemInfo(), indent=4, sort_keys=True))"
{
"buildflags": " -static-libstdc++ -static-libgcc -O3 -DNDEBUG -static-libstdc++ -static-libgcc
"compiler": "Unix Makefiles Linux-6.8.0-1017-azure:GNU-8.3.1",
"cores": [
"zmq",
"zmqss",
"tcp",
"tcpss",
"udp",
"ipc",
"interprocess",
"inproc"
],
"cpu": " 13th Gen Intel(R) Core(TM) i7-1355U",
"cpucount": 12,
"cputype": "x86_64",
"hostname": "WE50488",
"memory": "15815 MB",
"os": "Linux 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024",
"version": {
"build": "",
"major": 3,
"minor": 6,
"patch": 0,
"string": "3.6.0 (2024-12-09)"
},
"zmqversion": "ZMQ v4.3.5"
}