NREL / ROSCO

A Reference Open Source Controller for Wind Turbines
https://rosco.readthedocs.io/en/latest/
Apache License 2.0
106 stars 92 forks source link

add wintypes to the ctypes import #350

Open rdamiani opened 4 months ago

rdamiani commented 4 months ago

Using the internal simulator in the toolbox on win64, it bombs on line 256 of control_interface.py

dlclose = lambda handle: 0 if _dlclose(handle) else 1

fixed following this: https://bugs.python.org/issue30286

ctypes.windll.kernel32.FreeLibrary.argtypes = [wintypes.HMODULE] #RRD added and importing wintypes in the ctypes import.

check my fork if useful, and can close this. Thx.

dzalkind commented 3 months ago

Thanks for the update, @rdamiani. Can you provide a link to your suggested fix?

rdamiani commented 3 months ago

https://github.com/rdamiani/ROSCO/commit/e59b7ac901532b2cd1e1b82a1f924fd420c71911 hopefully this works