GMLC-TDC / HELICS-Examples

Examples for using HELICS with a variety of the supported programming languages
BSD 3-Clause "New" or "Revised" License
21 stars 19 forks source link

`fundamental_message_comm/endpoints` Fails with HelicsException "is not a number." #96

Closed awkbr549 closed 1 year ago

awkbr549 commented 1 year ago

Describe the bug When attempting to run the fundamental_message_comm/endpoints example, the system errors out with the following message(s):

[info] Waiting for 3 processes to finish ... [error] Process Battery has failed, killing other processes [error] Process Battery exited with return code 1 [warn] Last 10 lines of Battery.log: ... Traceback (most recent call last):File "/home/aking72/Development/awkbr549/HELICS-Examples/user_guide_examples/fundamental/fundamental_message_comm/endpoints/Battery.py", line 81, in <module>   fed = h.helicsCreateMessageFederateFromConfig("BatteryConfig.json")File "/home/aking72/.local/lib/python3.10/site-packages/helics/capi.py", line 3678, in helicsCreateMessageFederateFromConfig   raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode()) helics.capi.HelicsException: [-4] * Line 5, Column 13'60.0' is not a number. ` ... [info] Done.`

What is the expected behavior? The code should run without throwing an error.

To Reproduce Steps to reproduce the behavior:

  1. Navigate to the directory user_guide_examples/fundamental/fundamental_message_comm/endpoints.
  2. Run the example using helics run --path=fundamental_endpoints_runner.json.
  3. See output.

Environment (please complete the following information):

Additional context and information It seems the parsing logic expects an integer type when decoding the period argument of a federate configuration file. Simple fix is to replace 60.0 with 60.

trevorhardy commented 1 year ago

@awkbr549, this is working fine for me without the change to make period and int. Can you post of the results of helics --version here and what version of Python and OS you're using? I'm pretty sure HELICS should allow a float there and am a little concerned that there's a platform + Python + HELICS version where this isn't working.

trevorhardy commented 1 year ago

I had a colleague confirm that on Ubuntu 22.04 with Python 3.8 there wasn't a problem for him. I'm beginning to be frightened that this might be complicated.

trevorhardy commented 1 year ago

Is this still an on-going issue?

trevorhardy commented 1 year ago

Closing due to inactivity.