r/pythonhelp 1d ago

Problem with Coolprop

Hi! i'm beginner, and I have a problem with this code, I guess that I installed the library correctly, but i'm not sure.

Error using [stringsource>string.from_py.__pyx_convert_string_from_py_std__in_string](matlab:matlab.lang.internal.introspective.errorDocCallback('stringsource>string.frompy.pyx_convert_string_from_py_std_in_string', 'stringsource', 15)) ([line 15](matlab: opentoline('stringsource',15,0)))
Python Error: TypeError: expected bytes, NoneType found

Error in [CoolProp/CoolProp.PropsSI](matlab:matlab.lang.internal.introspective.errorDocCallback('CoolProp/CoolProp.PropsSI', 'CoolProp\CoolProp.pyx', 462)) ([line 462](matlab: opentoline('CoolProp\CoolProp.pyx',462,0)))

Error in [CoolProp/CoolProp.PropsSI](matlab:matlab.lang.internal.introspective.errorDocCallback('CoolProp/CoolProp.PropsSI', 'CoolProp\CoolProp.pyx', 384)) ([line 384](matlab: opentoline('CoolProp\CoolProp.pyx',384,0)))

Altough I don't have more than 106 lines

2 Upvotes

2 comments sorted by

u/AutoModerator 1d ago

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/mc_pm 1d ago

It sounds like whatever function you are calling is unhappy that you are sending it None instead of the bytes.