Closed svsk1ng closed 8 months ago
I think the error message is pretty clear -- python3 is not able to find the radicale
module. That is not a bug in radicale, but rather a configuration issue on your side, and as such does not belong in bugtracking.
Nevertheless, some pointers:
1) Can you run radicale outside of the service? e.g python3 -c 'import radicale'
does not give the same error message
python3 -m pip install radicale
2) Are you running the service as a specific user?sudo -u <service-user> python3 -c 'import radicale'
I've the same problem. The problem seems to appear if radicale
is installed in a local user account (as it should be) via pip.
Everything is correct:
.local/bin/radicale
is the main program.local/lib/python3.x/site-packages
contain the installed pip-packagesradicale
is configuredradicale
runs perfectly if started directly via a bash scriptHowever, if started as a service, apparently the process environment is not initialized the same way as if you are logged in locally. Therefore the python process does not find the radicale
packages installed locally. Therefore the error message "No module named radicale
"
In my case I'm using a standard Linux Ubuntu installation without any relevant modification, so this problem should exist on quite a lot of systems. The solution should be simple: Provide a suitable environment for python for services. But I've no idea how to do that right now.
SOLVED
No, sorry, I was wrong. The environment is set up correctly in general, but the service example provided by radicale
fails because security parameters get in the way. This is easy to see: If I comment them all out the service starts.
However,I figured out what exactly causes the problem: It's the ProtectHome=true
configuration parameter. Please leave everything as specified at https://radicale.org/3.0.html#tutorials/running-as-a-service but specify ProtectHome=read-only
instead. Then everything will work.
Hi there,
i have exactly the same problem. I strictly followed the systemd system-wide instructions, however journalctl tells me No module named radicale
.
Changing ProtectHome
from true
to read-only
did not change anything.
Then it shouldn't be exactly the same problem ;-)
If systemd tells you that no module named radicale exists, the problem is likely that something is wrong with the installation, for unknown reason. My recommendation: Check if you can at least invoke the radicale process manually. This MUST be the case. Then check if you have a radicale service. This MUST be the case as well. Your error message indicates that most likely the latter of these two issues is the problem.
Update: Please be aware that if you install radicale locally (= as a local user) radicale will not be available as a regular software package to the root user. You have to su to your local user to be able to find "radicale". (And this is what systemd does normally.)
I had the same problem (Ubuntu Server 20.04.2 LTS) but then from the remarks above I realized that I didn't install radicale as root.
My solution is therefore very simple, by adding 'sudo' in the installation command and it becomes:
sudo python3 -m pip install --upgrade radicale
Then it works perfectly.
I think this should be mentioned in the documentation.
Hope that it helps.
@gsenroc Thx. Works like a charm!
Followed instructions from @gsenroc and, indeed, it solves the issue with the "missing module". But another appears: An exception occurred during server startup: [Errno 30] Read-only file system: '/.var'
IMHO Raicale owners should check if the proposed solution is actually a valid one or just a workaround that may not be the recommended one.
I am trying to run radicale as a service on AWS Ubuntu 18 machine but i get the following error...
Can anw advice pls?