Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port number not being parsed correctly (maybe?) #2721

Open
trevorhardy opened this issue Jan 10, 2025 · 0 comments
Open

Port number not being parsed correctly (maybe?) #2721

trevorhardy opened this issue Jan 10, 2025 · 0 comments
Labels
bug Issue concerning incorrect code operation

Comments

@trevorhardy
Copy link
Contributor

Describe the bug
Though the example works on my computer (macOS, HELICS v3.6.0), the multi-broker example is failing in the Github auto-testing suite due to not being able to parse the brokerport value in the JSON config.

What is the expected behavior?
Examples should work in all environments.

To Reproduce

Environment:

  • Operating System: Linux Ubuntu 24.04.1 LTS
  • Language Extension: Python
  • what compiler or setup process did you use: `pip install helics[cli] helics_apps
  • HELICS version:
$ helics_app --version
helics, version 3.6.0

Python HELICS version 3.6.0

HELICS Library version 3.6.0 (2024-12-09)

HELICS Apps version 3.6.0

Error message from the federates shows whitespace where the invalid port number should be. They also don't show the valid port number range so something weird is going on.

Traceback (most recent call last):
  File "/home/runner/work/HELICS-Examples/HELICS-Examples/user_guide_examples/advanced/advanced_brokers/multi_broker/Charger.py", line 141, in <module>
    fed = h.helicsCreateCombinationFederateFromConfig("ChargerConfig.json")
  File "/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/helics/capi.py", line 3757, in helicsCreateCombinationFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-3] --brokerport: Value  not in range [
Traceback (most recent call last):
  File "/home/runner/work/HELICS-Examples/HELICS-Examples/user_guide_examples/advanced/advanced_brokers/multi_broker/Controller.py", line 49, in <module>
    fed = h.helicsCreateMessageFederateFromConfig("ControllerConfig.json")
  File "/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/helics/capi.py", line 3712, in helicsCreateMessageFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-3] --brokerport: Value  not in range [
Traceback (most recent call last):
  File "/home/runner/work/HELICS-Examples/HELICS-Examples/user_guide_examples/advanced/advanced_brokers/multi_broker/Battery.py", line 78, in <module>
    fed = h.helicsCreateValueFederateFromConfig("BatteryConfig.json")
  File "/opt/hostedtoolcache/Python/3.10.16/x[64](https://github.com/GMLC-TDC/HELICS-Examples/actions/runs/12718223150/job/35456459653#step:8:65)/lib/python3.10/site-packages/helics/capi.py", line 3669, in helicsCreateValueFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-3] --brokerport: Value  not in range [
@trevorhardy trevorhardy added the bug Issue concerning incorrect code operation label Jan 10, 2025
@trevorhardy trevorhardy changed the title Port number not being parsed corectly (maybe?) Port number not being parsed correctly (maybe?) Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue concerning incorrect code operation
Projects
None yet
Development

No branches or pull requests

1 participant