Я установил библиотеку PyFMI и пытаюсь загрузить fmu, созданный GT-Suite, в python.
Я следую этому уроку jmodelica:
https://jmodelica.org/pyfmi/tutorial.html
# Import the load function (load_fmu)
from pyfmi import load_fmu
этот набор выдает предупреждение
Could not find cannot import name 'radau5' from 'assimulo.lib' (C:\Users\chinn\Anaconda3\lib\site-packages\assimulo\lib\__init__.py)
Could not find cannot import name 'dopri5' from 'assimulo.lib' (C:\Users\chinn\Anaconda3\lib\site-packages\assimulo\lib\__init__.py)
Could not find cannot import name 'rodas' from 'assimulo.lib' (C:\Users\chinn\Anaconda3\lib\site-packages\assimulo\lib\__init__.py)
Could not find cannot import name 'odassl' from 'assimulo.lib' (C:\Users\chinn\Anaconda3\lib\site-packages\assimulo\lib\__init__.py)
Could not find ODEPACK functions.
Could not find RADAR5
Could not find GLIMDA.
Когда я пытаюсьзагрузить модель fmu
#Load the FMU
model = load_fmu('AHUdirectRPm.fmu')
Я получаю сообщение об ошибке
Traceback (most recent call last):
File "<ipython-input-2-77df09904b1e>", line 1, in <module>
model = load_fmu('AHUdirectRPm.fmu')
File "src\pyfmi\fmi.pyx", line 7899, in pyfmi.fmi.load_fmu
File "src\pyfmi\fmi.pyx", line 2558, in pyfmi.fmi.FMUModelCS1.__init__
File "src\pyfmi\fmi.pyx", line 1167, in pyfmi.fmi.FMUModelBase.__init__
File "src\pyfmi\fmi.pyx", line 45, in pyfmi.fmi.encode
TypeError: latin_1_encode() argument 1 must be str, not bytes
Может кто-нибудь помочь мне с этим.Что делать?
вывод 'pyfmi.check_packages ()'
Performing pyfmi package check
==============================
PyFMI version ................ 2.5
Platform ..................... win32
Python version ............... 3.7.3
Dependencies:
Package Version
------- -------
assimulo...................... 3.0
Cython........................ 0.29.6
lxml.......................... 4.3.2
matplotlib.................... 3.0.3
numpy......................... 1.16.2
scipy......................... 1.2.1
wxPython...................... -- Package missing - Warning issued, see details below
pyreadline.................... 2.1
setuptools.................... 40.8.0
Warnings
--------
-- The package wxPython could not be found. This package is needed to be able to use the plot-GUI.