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
Traceback:
  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

image

Ruby is already installed

image

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

image

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

4 Likes

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 2.7.4.1 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

Hi @chris I’ve been receiving this same error message with a bunch of my ladybug tools components. I’ve tried the solution above, updated my Rhino version and used the LB versioner but it still has not been resolved. Did you have any other solutions?

@chris & @mostapha, just a cheeky request to bump up the priority on @amynuccio 's question above :sweat_smile: we need her to do some urgent work and are experiencing delays because of this issue.

Pablo had the same problem a while back but it went away by itself magically (it came up at the end of the screen recording I sent you that one time) - I’m unable to solve it, but if you could at least give me some pointers/ideas maybe I can dig a little deeper.

Hey @MaxMarschall ,

I’m sorry but, if this is the same issue that seghier encountered, then it is on the side of the operating system and its compatibility with the simulation engines so it is outside of the realm of what we can fix within the ladybug_tools software. You should find the same issue on that machine with any other software that uses Radiance or EnergyPlus/OpenStudio.

Can @amynuccio work with an IT department to make sure that the operating system can support UTF-8 unicode characters?

This is also make a problem, you must verify which ruby version you used.

Yes, that’s correct @seghier . You can see the version of Ruby that is compatible with OpenStudo by checking their compatibility matrix here:

Actually, I just noticed that the OpenStudio team changed the way the encodings work in the last few months:

… and these changes have made it into the OpenStudio 3.3 release that happened a little over a week ago. I’ll start working towards updating the development version of the LBT plugin to OpenStudio 3.3 and maybe we can see if this will address this issue.

2 Likes