Encoding error when using OpenStudio

Hello , i try to use this component but i got this errors:

  Error: Runtime error (TypeErrorException): iteration over non-sequence of type NoneType
  line 35, in <genexpr>, "C:\Users\user\ladybug_tools\python\Lib\site-packages\lbt_recipes\version.py"
  line 33, in check_openstudio_version, "C:\Users\user\ladybug_tools\python\Lib\site-packages\lbt_recipes\version.py"
  line 255, in run, "C:\Users\user\ladybug_tools\python\Lib\site-packages\lbt_recipes\recipe.py"
  line 148, in script

How to fix this and how to use this new component ? , if there is an example available this better

I try to get openstudio version from powershell but it looks there is a problem with ruby


Ruby is already installed


Hi @seghier ,

It looks like your OpenStudio CLI is hitting some encoding error. Do any of the suggestions here help?

Do you get the same error when you run the command in the following format?

Hi @chris
In Ruby folder installation i fix the error with encoding but it look that openstudio use another ruby folder where the problem still exist, i search and read the topic you share but no solution yet

Problem solved, i use this in cmd chcp 1252


1 Like

But still exist in Python and Ghpython

Yes the same error in cmd and powershell, and i use the same solution for both of them but the solution is temporally

This solve the problem


Thank you for posting the solution to this, @seghier . I am sure that you have helped a lot of people who might experience this issue and may find this post. I’ll see if I can add a better error message to the plugin when this encoding error arises.

1 Like

FYI, I just added a better error message for this case:

Hopefully, this increases the chances of people changing their language settings when they encounter this issue.

1 Like

Thank you , this will of course help people.
Another thing after some tests i found that ruby 32bits and ruby 3.0 64bits don’t work with Openstudio.
The version 64bits work better, but maybe other people don’t have a problem with this.

I try to update lbt-recipes, i set python from ladybug folder as interpreter but i got this error

pip install -U lbt-recipes
Fatal error in launcher: Unable to create process using '"c:\users\mingo\appdata\local\programs\python\python37\python.exe" 
"C:\Users\user\ladybug_tools\python\Scripts\pip.exe" install -U lbt-recipes': The system cannot find the file specified.

In my laptop there is no user called mingo

Hi @seghier ,
I don’t know how exactly you were able to get that error but you should just be able to use the LB Versioner to update your installation to the latest development version. That component will automatically call pip under the hood to update all of your core libraries (including lbt-recipes).

1 Like

Thanks @chris , yes i did this and it’s updated now

1 Like