Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
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
Old 07-03-2025, 11:09 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Set the HOME and USER env vars correctly in whatever environment you are running calibre-server and you will be fine.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Requesting help running calibre-debug on MacOS bace651 Calibre 9 10-10-2023 11:36 PM
running calibre-server via launchd on macOS Big Sur bhyde Server 2 06-30-2021 01:11 PM
How can I save all my tags to a file, and how can another macOS Calibre user it? adrianf Calibre 17 03-15-2020 07:05 PM
Can I build Calibre 4.0 on a native macOS machine running OS X El Capitan 10.11.6? vaboro Development 23 10-16-2019 04:37 PM
[How To] Running Calibre server as a news server sws Related Tools 0 04-09-2013 08:27 AM


All times are GMT -4. The time now is 02:17 AM.


MobileRead.com is a privately owned, operated and funded community.