View Single Post
Old 07-03-2025, 07:57 PM   #1
dunners
Junior Member
dunners began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2025
Device: iPad with Marvin
Running calibre-server as another user on macOS

For years I have successfully run the calibre -server from a dedicated user outside my main user account. Recently the server fails on start up because it is looking for preference files in the main user account (to which it has no access) I can't pin down exactly when this started. I'm running Sonoma 14.7.6 and the latest Calibre version.

The traceback when launching the server from the dedicated user login is:
Failed to read environment variables from: ~/Library/Preferences/calibre/macos-env.txt with error: [Errno 13] Permission denied: '/Users/MAIN_USER/Library/Preferences/calibre/macos-env.txt'
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 42, in <module>
File "site.py", line 30, in main
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "bypy-importer.py", line 279, in exec_module
File "calibre/__init__.py", line 39, in <module>
File "calibre/startup.py", line 147, in initialize_calibre
File "calibre/utils/localization.py", line 314, in set_translators
File "calibre/utils/localization.py", line 105, in get_lang
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "bypy-importer.py", line 279, in exec_module
File "calibre/utils/config_base.py", line 602, in <module>
File "calibre/utils/config_base.py", line 497, in __getitem__
File "calibre/utils/config_base.py", line 507, in get
File "calibre/utils/config_base.py", line 491, in refresh
File "calibre/utils/config_base.py", line 414, in parse
File "calibre/utils/config_base.py", line 378, in read_data
File "calibre/utils/config_base.py", line 361, in retry_on_fail
File "calibre/utils/config_base.py", line 376, in r
PermissionError: [Errno 13] Permission denied: '/Users/MAIN_USER/Library/Preferences/calibre/global.py.json'

In fact the macos-env.txt file first looked for doesn't exist at that location. The global.py.json file does exist and also exists in the dedicated user's own Preferences folder.

Any thoughts as to why this is no longer working? All suggestions gratefully received.

Thanks
dunners is offline   Reply With Quote