Unable to start GrampsAIO64 5.2.4 after install. How can I fix this?

Windows 11. GrampsAIO64 5.2.4.

How can I fix this?
See the CMD below + Screenshot .

  1. I tried to prees the Desktop shortcut.
  2. Also from CMD (the DOS command line).

I do:

cd "C:\Program Files\GrampsAIO64-5.2.4"

and:

.\gramps.exe

Here’s the error that I get:

C:\Program Files\GrampsAIO64-5.2.4> .\gramps.exe
Traceback (most recent call last):
  File "AIO/__startup__.py", line 140, in run
  File "AIO/console.py", line 25, in run
  File "AIO/grampsaioc.py", line 42, in <module>
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\grampsapp.py", line 54, in <module>
    from .gen.const import APP_GRAMPS, USER_DIRLIST, USER_DATA, ORIG_HOME_DIR
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\const.py", line 244, in <module>
    GRAMPS_LOCALE = GrampsLocale(localedir=_resources.locale_dir)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\utils\grampslocale.py", line 468, in __init__
    self._GrampsLocale__init_first_instance()
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\utils\grampslocale.py", line 302, in __init_first_instance
    win32_locale_init_from_env(self, HAVE_ICU, ICU_LOCALES)
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\utils\win32locale.py", line 239, in win32_locale_init_from_env
    _set_lang(glocale)
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\utils\win32locale.py", line 150, in _set_lang
    (lang, enc) = _check_mswin_locale_reverse(pylang)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\GrampsAIO64-5.2.4\gramps\gen\utils\win32locale.py", line 119, in _check_mswin_locale_reverse
    (lang, country) = loc.split("_")
                      ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

C:\Program Files\GrampsAIO64-5.2.4>

What is your locale? Do you have the LANG environment variable set?

Hi.
Is it on control panel → advanced? as follows?

I do not see a LANG evironment variable.

I do not see LANG environment variable.

is it some spesial reason for why you want to start “gramps.exe” and not “grampsv”?

I still run 5.2.3, but my desktop shortcut points to grampsv.

I run multiple “locals” on my PC, so the run commands look like this for the shortcuts:
“%comspec% /c set LANG=en_US.UTF-8 && start grampsw.exe”

this can be used on “gramps.exe” to… at least on 5.2.3

The shortcut target is indeed this:
"C:\Program Files\GrampsAIO64-5.2.4\grampsw.exe"
and it shows the same error popup - as posted above. Also when running this “as is” from CMD .

But this works from CMD:

set LANG=en_US.UTF-8 && "C:\Program Files\GrampsAIO64-5.2.4\grampsw.exe"

Should I set the Desktop shortcut? to have this?

Yes. If you set the LANG environment variable then Gramps will use it.

If it is not set, then we try to get the locale with:

import locale
locale.getlocale()

You could try running this in a python console.

The expected result is something like:

("en_US", "UTF-8")

We then try to split the first item using the underscore. However, in your case it looks like the first item doesn’t contain an underscore.

I found it to be the best for me, because I wanted to start Gramps both in my native language and English.

And because my Windows installation is in English, while my indata is my native language (no_NB).

So, I just installed Gramps with all the languages I was going to “maybe” use, and created a shortcut for each.
It is as simple and problem free as it can come…

2 Likes

Just one thing if you use the LANG in the shortcut…

You need to remember to change the “Start in” folder path in the shortcut when you update to new versions of Gramps if you don’t use the same install folder for all, e.g. uninstall and install to the same folder…

I created on my desktop a “gramps.bat” file that has this:

set LANG=en_US.UTF-8 && "C:\Program Files\GrampsAIO64-5.2.4\grampsw.exe"

Works for me.
This is good as a workaround to start working.

(I had Gramps on WSL, on a laptop that was’t mine and it was slow, now I switched now to my private home PC - looks much faster :slight_smile: )

You can use it in the Gramps Shortcut also…

This command in the “Target” part and the path to your Gramps installation in the “Start in” field…

like this:

2 Likes

meorero,
we are glad to hear that you have a work around.
But the Gramps installer should work better.

Can you tell us what is the language of your Windows User Interface? (english, italian, greek, etc…)

When you installed Gramps did you install it for all users or just one user?
In the Gramps installer did you install any other languages?

Hi, The Windows 11 UI - is English. And it was English when I installed Gramps.

As far as I remember - I installed for all users. (This is what I usually do . . . but actually I don’t really care, it’s my PC, and I am the only user).

Thanks for the info,
I wasn’t able to reproduce your issue, so the questions were to help discover what is different about your install. So far every thing the same, so no differences/clues to follow.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.