jspricke / radicale-remind

Radicale storage backends for Remind and Abook
GNU General Public License v3.0
41 stars 4 forks source link

FileNotFoundError: remind command not found, please install it #22

Closed gour closed 2 years ago

gour commented 2 years ago

I've re-installed Radicale, but this time with proper storage type. The service starts, but when I try to access Radicale's admin, I get

Error: 500 Internal Server Error

and systemd-status gives:

Jul 06 17:02:33 s30.wservices.ch env[3238145]:     for item in items:
Jul 06 17:02:33 s30.wservices.ch env[3238145]:   File "/home/atmarama/.local/lib/python3.9/site-packages/radicale_remind.py", line 262, in discover
Jul 06 17:02:33 s30.wservices.ch env[3238145]:     for filename in adapter.get_filesnames():
Jul 06 17:02:33 s30.wservices.ch env[3238145]:   File "/home/atmarama/.local/lib/python3.9/site-packages/remind.py", line 267, in get_filesnames
Jul 06 17:02:33 s30.wservices.ch env[3238145]:     self._update()
Jul 06 17:02:33 s30.wservices.ch env[3238145]:   File "/home/atmarama/.local/lib/python3.9/site-packages/remind.py", line 263, in _update
Jul 06 17:02:33 s30.wservices.ch env[3238145]:     self._reminders = self._parse_remind(self._filename)
Jul 06 17:02:33 s30.wservices.ch env[3238145]:   File "/home/atmarama/.local/lib/python3.9/site-packages/remind.py", line 83, in _parse_remind
Jul 06 17:02:33 s30.wservices.ch env[3238145]:     raise FileNotFoundError(
Jul 06 17:02:33 s30.wservices.ch env[3238145]: FileNotFoundError: remind command not found, please install it

although I've statically compiled remind on the system:

$ whereis remind
remind: /home/atmarama/bin/remind

$ emind -help

REMIND 04.00.01 (English version) Copyright 1992-2022 Dianne Skoll
Usage: remind [options] filename [date] [time] [*rep]
Options:
 -n     Output next occurrence of reminders in simple format
 -r     Disable RUN directives
 -@[n,m] Colorize COLOR reminders
 -c[a][n] Produce a calendar for n (default 1) months
 -c[a]+[n] Produce a calendar for n (default 1) weeks
 -w[n[,p[,s]]]  Specify width, padding and spacing of calendar
 -s[a][+][n] Produce `simple calendar' for n (1) months (weeks)
 -p[a][n] Same as -s, but input compatible with rem2ps
 -l     Prefix each simple calendar line with line number and filename comment
 -v     Verbose mode
 -o     Ignore ONCE directives
 -t[n]  Trigger all future (or those within `n' days)
 -h     `Hush' mode - be very quiet
 -a     Don't trigger timed reminders immediately - just queue them
 -q     Don't queue timed reminders
 -f     Trigger timed reminders by staying in foreground
 -z[n]  Enter daemon mode, waking every n (1) minutes.
 -d...  Debug: e=echo x=expr-eval t=trig v=dumpvars l=showline f=tracefiles
 -e     Divert messages normally sent to stderr to stdout
 -b[n]  Time format for cal: 0=am/pm, 1=24hr, 2=none
 -x[n]  Iteration limit for SATISFY clause (def=1000)
 -kcmd  Run `cmd' for MSG-type reminders
 -g[dddd] Sort reminders by date, time, priority, and 'timedness'
 -ivar=val Initialize var to val and preserve var
 -m     Start calendar with Monday rather than Sunday
 -y     Synthesize tags for tagless reminders
 -j[n]  Run in 'purge' mode.  [n = INCLUDE depth]

Any idea what might be wrong?

gour commented 2 years ago

After restart it seems it starts OK (again):

$ systemctl --user status radicale
● radicale.service - A simple CalDAV (calendar) and CardDAV (contact) server
     Loaded: loaded (/home/atmarama/.config/systemd/user/radicale.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-07-06 17:07:39 CEST; 2s ago
   Main PID: 3244340 (python3)
      Tasks: 1 (limit: 154486)
     Memory: 14.7M
        CPU: 74ms
     CGroup: /user.slice/user-1736.slice/user@1736.service/app.slice/radicale.service
             └─3244340 python3 -m radicale --debug

Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Skipped missing config file '/etc/radicale/config'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Loaded config file '/home/atmarama/.config/radicale/config'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Loaded command line arguments
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Starting Radicale
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] auth type is 'radicale.auth.htpasswd'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] storage type is 'radicale_remind'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] rights type is 'radicale.rights.from_file'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] web type is 'radicale.web.internal'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Listening on '[127.0.0.1]:62013'
Jul 06 17:07:39 s30.wservices.ch env[3244340]: [2022-07-06 15:07:39 +0000] [3244340] [INFO] Radicale server ready
jspricke commented 2 years ago

make sure remind is in $PATH.

closing as it seems fixed :).

gour commented 2 years ago

make sure remind is in $PATH.

closing as it seems fixed :).

No, it's not fixed, since after attempting to access Radicale's admin, the same thing does happen!!

jspricke commented 2 years ago

so do as I said:

make sure remind is in $PATH.

gour commented 2 years ago

so do as I said:

make sure remind is in $PATH.

But it is in $PATH:

$ echo $PATH
/home/atmarama/bin /home/atmarama/.local/bin /usr/local/bin /usr/bin /bin /usr/games

Any other hint?

jspricke commented 2 years ago

I guess that's not the $PATH systemd uses (at least not by default). I guess you can change the radicale.service to set it with something like:

[Service]
Environment=PATH=/home/atmarama/bin:/home/atmarama/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
gour commented 2 years ago

Ahh, that helped. Thanks a lot!