eric ide


Author: Qb
Recipients: Qb
Date: 2022-04-25.18:27:24
After upgrading from eric6 to eric7, I cannot start eric7 from its macOS app bundle /Applications/ It stalled with a message box saying "The background client for Python3 disconnected because of an unknown reason. Should it be restarted?" caused by:

<class 'enchant.errors.Error'>: 
No tag specified and default language could not be determined.
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/", line 429, in <module>
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/", line 408, in main
    mainWindow = UserInterface(app, loc, splash, pluginFile, disabledPlugins,
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/UI/", line 308, in __init__
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/UI/", line 973, in __createObjects
    self.__vcsStatusWidget = StatusWidget(
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/VCS/", line 123, in __init__
    self.__quickCommitEdit = EricSpellCheckedTextEdit(self)
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/EricWidgets/", line 654, in __init__
  File "/Applications/eric7/lib/python3.9/site-packages/eric7/EricWidgets/", line 52, in __init__
    spellDict = enchant.DictWithPWL(
  File "/Applications/eric7/lib/python3.9/site-packages/enchant/", line 782, in __init__
    super().__init__(tag, broker)
  File "/Applications/eric7/lib/python3.9/site-packages/enchant/", line 536, in __init__
    raise Error(err)

Version Numbers:
  Python 3.9.12, 64-Bit
  Qt 6.3.0
  PyQt6 6.3.0
  PyQt6-Charts 6.3.0
  PyQt6-WebEngine 6.3.0
  PyQt6-QScintilla 2.13.2
  sip 6.6.1
  WebEngine 94.0.4606.126
  eric7 22.4 (rev. 429cc091bf0e)

Platform: darwin
3.9.12 (main, Mar 25 2022, 11:13:23) 
[Clang 11.0.0 (clang-1100.0.33.16)]

The default language cannot be detected since LC_* environ variables are not passed when an application is started from its app bundle (for example, double clicking on its icon). However, environment variables can be set in the plist file inside the bundle.

The following lines can be added to the file /Applications/ to solve the issue:


After running `plutil /Applications/` to check that there are no errors, the Launch Service Database must be updated with the following command:

`/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/`

After that patch, eric7 can be started from the app bundle without any inconvenience.

I have attached the modified plist file for your consideration.

Of course, this solution implies that the system language is really not available for the application (it is replaced by a default fixed language stored in the plist possibly different from user's preferred language). So it is probably not the best solution for this issue but it does its work for me.

Additionally, I have noticed that the enchant.Error exception raised when no default language can be found is not caught in EricWidgets/ as (I suppose) intended. The block starting in line 58 is not executed since it catches enchant.DictNotFoundError but not enchant.Error. Hence using "English dictionary if no locale dictionary is available or the default one could not be found" or "forget about spell checking" if "still no dictionary could be found" are not really executed.

Thanks a lot. I have just tested eric7 for the first time and I very happy with it. Nice work!!
Date User Action Args
2022-04-25 18:27:25Qbsetrecipients: + Qb
2022-04-25 18:27:25Qbsetmessageid: <>
2022-04-25 18:27:24Qblinkissue425 messages
2022-04-25 18:27:24Qbcreate