# Encoding error when using OpenStudio

**URL:** <https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000>\
**Category:** ladybug-tools\
**Tags:** honeybee\
**Created:** [September 26, 2021, 8:47pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000 "2021-09-26T20:47:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 26, 2021, 8:47pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/1 "2021-09-26T20:47:09Z")

</div>

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

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/a/c/ac81e3b875d7fd26a0e56d1330a1dccab40a0518.png)

```auto
  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

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 12:14am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/2 "2021-09-27T00:14:34Z")

</div>

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

![image](https://discourse.ladybug.tools/uploads/default/original/3X/9/9/9994a1b545cec3f6595b00aeeee58f6c75d57a6f.png)

Ruby is already installed

![image](https://discourse.ladybug.tools/uploads/default/original/3X/5/4/54fb798b802b89fe874eede6032e2d47e7901170.png)

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 27, 2021, 12:25am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/3 "2021-09-27T00:25:22Z")

</div>

Hi @seghier ,

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

> <https://stackoverflow.com/questions/64550260/unknown-encoding-name-when-using-gem-command>

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

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/6/f/6f760b57deb35f2d5e1f8568df82dd45362bb015.png)

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 12:32am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/4 "2021-09-27T00:32:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 12:39am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/5 "2021-09-27T00:39:38Z")

</div>

Problem solved, i use this in cmd **chcp 1252**

![image](https://discourse.ladybug.tools/uploads/default/original/3X/7/3/733bf34b5d4d2d052cdc20aab2b7b0d5afbaf9ab.png)

> <https://stackoverflow.com/questions/22815542/rails4-unknown-encoding-name-cp720>

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 12:43am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/6 "2021-09-27T00:43:30Z")

</div>

But still exist in Python and Ghpython

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/d/1/d1bcf935f4bd6fd98227e339240ff94a29bea168.png)

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 12:48am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/7 "2021-09-27T00:48:23Z")

</div>

> [@chris](#):
>
> Do you get the same error when you run the command in the following format?

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

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 1:09am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/8 "2021-09-27T01:09:37Z")

</div>

This solve the problem

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/9/2/92500d568bac4e09ce635400885178a40e404ba1.png)

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/4/a/4adba28772066edc7b932a7e111862060e6f0028.png)

> <https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8/685264#685264>

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 27, 2021, 12:27pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/9 "2021-09-27T12:27:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 27, 2021, 2:25pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/10 "2021-09-27T14:25:46Z")

</div>

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

> <https://github.com/ladybug-tools/lbt-recipes/pull/406>

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

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 2:39pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/11 "2021-09-27T14:39:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 2:56pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/12 "2021-09-27T14:56:11Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [September 27, 2021, 3:27pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/13 "2021-09-27T15:27:48Z")

</div>

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](https://docs.ladybug.tools/ladybug-primer/components/5_version/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).

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [September 27, 2021, 3:36pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/14 "2021-09-27T15:36:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amynuccio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@amynuccio](https://discourse.ladybug.tools/u/amynuccio)\
**Post date:** [November 11, 2021, 11:34pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/15 "2021-11-11T23:34:55Z")

</div>

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?

 ![2021-11-12_10-31-34](https://discourse.ladybug.tools/uploads/default/original/3X/4/9/490d3e7f26444af685c0596ccb4ffa896dbfd424.png)

---

<div class="post-metadata">

**Author:** ![MaxMarschall](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/maxmarschall/32/393_2.png) [@MaxMarschall](https://discourse.ladybug.tools/u/MaxMarschall)\
**Post date:** [November 16, 2021, 3:05am UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/16 "2021-11-16T03:05:38Z")

</div>

@chris & @mostapha, just a cheeky request to bump up the priority on @amynuccio 's question above 😅 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.

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [November 16, 2021, 4:58pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/17 "2021-11-16T16:58:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![seghier](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/s/b2d939/32.png) [@seghier](https://discourse.ladybug.tools/u/seghier)\
**Post date:** [November 16, 2021, 5:07pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/18 "2021-11-16T17:07:49Z")

</div>

> [@seghier](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [November 16, 2021, 5:21pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/19 "2021-11-16T17:21:52Z")

</div>

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

> **[OpenStudio SDK Version Compatibility Matrix · NREL/OpenStudio Wiki](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix)**
>
> OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance. - OpenStudio SDK Version Compat...

---

<div class="post-metadata">

**Author:** ![chris](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/chris/32/10179_2.png) [@chris](https://discourse.ladybug.tools/u/chris)\
**Post date:** [November 16, 2021, 6:07pm UTC](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000/20 "2021-11-16T18:07:42Z")

</div>

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

> <https://github.com/NREL/OpenStudio/pull/4349>
>
> Pull request overview
> \---------------------
> 
> Fix #3514 - replace rubystrings.…swg fragment to use rb\_utf8\_str\_new instead of rb\_str\_new
> 
> \### Pull Request Author
> 
> 
> 
> - \[\] Model API Changes / Additions
> - \[\] Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
> - \[\] Model API methods are tested (in \`src/model/test\`)
> - \[\] EnergyPlus ForwardTranslator Tests (in \`src/energyplus/Test\`)
> - \[\] If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
> - \[\] If needed, added VersionTranslation rules for the objects (\`src/osversion/VersionTranslator.cpp\`)
> - \[\] Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
> - \[\] All new and existing tests passes
> - \[\] If methods have been deprecated, update rest of code to use the new methods
> 
> \*\*Labels:\*\*
> 
> - \[\] If change to an IDD file, add the label \`IDDChange\`
> - \[\] If breaking existing API, add the label \`APIChange\`
> - \[\] If deemed ready, add label \`Pull Request - Ready for CI\` so that CI builds your PR
> 
> \### Review Checklist
> 
> This will not be exhaustively relevant to every PR.
> - \[\] Perform a Code Review on GitHub
> - \[\] Code Style, strip trailing whitespace, etc.
> - \[\] All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
> - \[\] Labeling is ok
> - \[\] If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
> - \[\] If feature, test running new feature, try creative ways to break it
> - \[\] CI status: all green or justified

… and these changes have made it into [the OpenStudio 3.3 release](https://github.com/NREL/OpenStudio/releases/tag/v3.3.0) 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.

[Next page](https://discourse.ladybug.tools/t/encoding-error-when-using-openstudio/16000.md?page=2)
