Type error loading CoolProp Raspberry Pi4

50 views
Skip to first unread message

Richard Hatfield

unread,
Dec 27, 2023, 6:16:26 AM12/27/23
to coolprop-users
Raspberry Pi 4 running Buster
Python 3.9.2
Cython 3.0.6
CoolProp 6.6.0

I had no problem installing CoolProp from GitHub, there were no installation errors but on trying to import the module I get a type error:

Traceback (most recent call last):
  File "/home/richard/python_code/hydrogen_density1.py", line 1, in <module>
    import CoolProp.CoolProp as CP
  File "/home/richard/.local/lib/python3.9/site-packages/CoolProp/__init__.py", line 22, in <module>
    __fluids__ = CoolProp.get_global_param_string('fluids_list').split(',')
  File "CoolProp.pyx", line 309, in CoolProp.CoolProp.get_global_param_string
  File "<stringsource>", line 15, in string.from_py.__pyx_convert_string_from_py_std__in_string
TypeError: expected bytes, str found

I have seen a similar problem described by others but I cant find a solution. I have not tried degrading python to say 3.8 , as I have many other python packages that are working fine and would be affected.

Help would be greatly appreciated!
Reply all
Reply to author
Forward
0 new messages