Installation Issues with Non-ASCII Characters

Dear Ladybug team,

thank you for the nice update!

I have an installation issue:
Step 1 works well. In step 2, when toggling True, after some successful steps, the component returns an error.

Hereby is the content of the output panel:

  1. Installing Ladybug Tools core Python libraries.

  2. Installing lbt-dragonfly[cli]==0.5.1 via pip using

  3. Ladybug Tools core Python libraries successfully installed!

  4. Installing Queenbee core Python libraries.

  5. Installing queenbee-luigi[cli]==0.5.6 via pip using

  6. Queenbee core Python libraries successfully installed!

  7. Installing ladybug-rhino Python library.

  8. Installing ladybug-rhino[cli]==1.19.1 via pip using

  9. Ladybug-rhino Python library successfully installed!

9. Runtime error (EncoderFallbackException): ‘ascii’ codec can’t encode character ‘\u415’ in position 12: ordinal not in range(128)

line 303, in write_iron_python_batch_file, “”
line 483, in script

I have the Ladybug legacy installed, could it still cause this issue or it has to do with something else?

Thank you in advance for your reply!

Kind regards,

Hi @Katya ,

This issue is happening because you have this character somewhere within a file path:

Do you have this character on your computer username? If not, I’ll give you a few other places to check.

1 Like

Hi chris,

Thank you for the fast reply! Indeed, I had Cyrillic user folder name. After renaming, it worked! Thanks! :slight_smile:


1 Like

hello i am having the same problem can you elaborate further??

The answer has been elaborated here:

Hi Chris,
This problem is not solved in the new version (1.5.0)

I can’t change the name of the \C:\Users[username] folder
It is inconvenient to work with a new username

  1. Created a new ASCII User
  2. Installed both steps. Everything works correctly
  3. Copied all installed files from C:\Users [ASCII-USERNAME] and C:\Users and [ASCII-USERNAME]\AppData\roaming\grasshopper\library folders in old [non-ascii-username]
  4. Launched a new definition in gh (not ascii user)
    ladybug did not work correctly

How do I install ladybug 1.5.0 correctly for a non-ascii username folder (home_folder)?

In the oldest version, all the steps were installed correctly
In version 1.4.0 only the first step
In version 1.5.0 none


Runtime error (EncoderFallbackException): ‘ascii’ codec can’t encode character ‘\u412’ in position 9: ordinal not in range(128)

line 121, in script

line 117-138

if _setup_python:
    # create the installation folder
    home_folder = os.getenv('HOME') or os.path.expanduser('~')
    except UnicodeDecodeError:
        msg = 'Your username folder "{}" contains non-ASCII characters\n' \
            'While the latest version of Ladybug Tools supports most non-ASCII ' \
            'characters, there are some characters that can still cause issues.\n' \
            'To avoid all poential problems, you can create a new username with ' \
            'non-ASCII characters and install Ladybug Tools from that'.format(home_folder)
    lb_folder = os.path.join(home_folder, 'ladybug_tools')
    if not os.path.isdir(lb_folder):
        print('Ladybug Tools installation folder created at:\n'
              '{}\n '.format(lb_folder))
        print('Ladybug Tools installation folder already exists at:\n'
              '{}\n '.format(lb_folder))

Hi @v_lipa ,

If you really want to use your non-ASCII username, I recommend using the free single-click Pollination Grasshopper installer that you can get here after making a pollination account.

That will set up the installation in “Program Files” instead of your user folder and this should save you from a lot of headaches and hacking that you seem to be doing now.