Closed filippobertolotti0 closed 2 weeks ago
Hi Filippo, Sorry for the late response. I tried to reproduce the error on my side, but your code seems to work fine for me. Does the error also occur for other models, especially Modelica based ones, or only for "SwissHouseRSlaTank-v0"? I am not sure if it could be related to that, but it seems like you have FMPy version 0.3.20 installed, whereas in the requirements, version 0.2.14 is requested. You could try if using the package versions specified in the requirements solves the issue.
It works properly after the installation of the correct version of FMPy 4. thank you for the support!
hi! trying the code copied by the notebook example into the documentation of SwissHouseRSlaTank-v0 model i found an error. The compilation return the following error: AttributeError: 'NoneType' object has no attribute 'get_inputs_names'.
Seems that it can't build the environment correctly. i've tried other models, and all of them work properly.
Following, the full error log:
Unable to build model. Failed to validate modelDescription.xml:
The code:
import energym weather = "CH_BS_Basel" env = energym.make("SwissHouseRSlaTank-v0", weather=weather, simulation_days=20) inputs = env.get_inputs_names() outputs = env.get_outputs_names() print("inputs:", inputs) print("outputs:", outputs)
thanks in advance. Filippo