cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
794 stars 237 forks source link

specter desktop issue with locale #1421

Open stridervc opened 3 years ago

stridervc commented 3 years ago

Hi,

I'm trying specter-desktop-1.6.1-rc1, after having trouble with older versions, on Debian 11.

Specter fails to start up, I've tried the recommended exports listed below, with no luck. This is from specterApp.log :

2021-10-07T06:58:44.518Z [info] : Framework Ready! Starting tray Icon ...
2021-10-07T06:58:44.535Z [info] : Framework Ready! Initializing Main-Window, popultaing Menu ...
2021-10-07T06:58:46.319Z [info] : Starting specterd /home/redshift/.specter/specterd-binaries/specterd server,--no-filelog
2021-10-07T06:58:48.076Z [info] : stderr-Traceback (most recent call last):
  File "specterd.py", line 4, in <module>
  File "click/core.py", line 829, in __call__
  File "click/core.py", line 760, in main
  File "click/_unicodefun.py", line 126, in _verify_python3_env
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/python3/ for mitigation steps.

This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

Click discovered that you exported a UTF-8 locale but the locale system could not pick up from it because it does not exist. The exported locale is 'en_US.utf-8' but it is not supported
[564142] Failed to execute script specterd

2021-10-07T06:58:48.077Z [info] : stdout-Initializing HWI...

2021-10-07T06:58:48.346Z [error] : specterd exited with code 255
2021-10-07T06:58:48.349Z [info] : child process exited with code 255
k9ert commented 2 years ago

I think this is a duplicate of #1406 which has been fixed in https://github.com/cryptoadvance/specter-desktop/pull/1405 We just need to make a release for that ... hopefully soon!

And btw, thank you very much for testing the RC :-)

stridervc commented 2 years ago

Is this fix included in 1.7.0? Because I'm still running into the same problem with 1.7.0

stridervc commented 2 years ago

Still an issue in 1.7.2

stridervc commented 2 years ago

I saw that 'en_US.utf-8' was the hard coded locale. I'm not sure it's safe to assume the US locale is available on all systems.

I was able to get specter running by enabling the US locale on my system by:

k9ert commented 2 years ago

Sorry for not answering sooner. So i see you suffered from not having this locale in your system. Practically i see the best option for now to check at system-startup whether the locale is existing and fail more gracefully if it's not.