dengste / org-caldav

Caldav sync for Emacs orgmode
GNU General Public License v3.0
724 stars 105 forks source link

Wrong type argument: stringp, nil #129

Open rhoeberg opened 7 years ago

rhoeberg commented 7 years ago

I had caldav working some months ago, but stopped using. After trying to get back to it gives me an error: "Wrong type argument: stringp, nil"

this is my setup: (setq plstore-cache-passphrase-for-symmetric-encryption t) (setq org-caldav-url "secret.url/dav/") (setq org-caldav-calendar-id "96") (setq org-caldav-inbox (expand-file-name "~/org/cal.org")) (setq org-caldav-files '("~/gtd/gtd.org")) (setq org-icalendar-timezone "Europe/Berlin") (setq org-icalendar-alarm-time 15)

Below you can see the debug output. Could it be that its trying to add a file that doesnt exists? I have checked that my agenda files are all valid, and don't have any idea about where else to look for "ghost" files.

Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-exists-p(nil) org-check-agenda-file(nil)

257 "\3012 \302!\210r\303!q\210\203\304\305\"\210\306\307\310\211\305\311%)0\207" [org-icalendar-store-UID nextfile org-check-agenda-file org-get-agenda-file-buffer org-icalendar-create-uid t org-export-as icalendar nil (:ascii-charset utf-8 :ascii-links-to-notes nil)] 7 "\n\n(fn FILE)"

mapconcat(#[257 "\3012 \302!\210r\303!q\210\203\304\305\"\210\306\307\310\211\305\311%)0\207" [org-icalendar-store-UID nextfile org-check-agenda-file org-get-agenda-file-buffer org-icalendar-create-uid t org-export-as icalendar nil (:ascii-charset utf-8 :ascii-links-to-notes nil)] 7 "\n\n(fn FILE)"] (nil "~/gtd/gtd.org" "/Users/Rasmus/org/cal.org") "") org-icalendar--combine-files(nil "~/gtd/gtd.org" "/Users/Rasmus/org/cal.org") apply(org-icalendar--combine-files nil ("~/gtd/gtd.org" "/Users/Rasmus/org/cal.org")) (if (version< org-version "8.3beta") (apply (quote org-icalendar--combine-files) nil orgfiles) (apply (quote org-icalendar--combine-files) orgfiles)) (if (featurep (quote ox-icalendar)) (if (version< org-version "8.3beta") (apply (quote org-icalendar--combine-files) nil orgfiles) (apply (quote org-icalendar--combine-files) orgfiles)) (apply (quote org-export-icalendar) t orgfiles)) (let ((icalendar-file (if (featurep (quote ox-icalendar)) (quote org-icalendar-combined-agenda-file) (quote org-combined-agenda-icalendar-file))) (orgfiles (let ((inbox-file (org-caldav-inbox-file org-caldav-inbox))) (if (member inbox-file org-caldav-files) org-caldav-files (append org-caldav-files (list inbox-file))))) (org-export-select-tags org-caldav-select-tags) (org-icalendar-exclude-tags org-caldav-exclude-tags) (org-icalendar-store-UID t) (org-icalendar-include-bbdb-anniversaries nil) (icalendar-uid-format "orgsexp-%h") (org-export-before-parsing-hook (append org-export-before-parsing-hook (if org-caldav-skip-conditions (progn (quote (org-caldav-skip-function)))))) (org-icalendar-date-time-format (cond ((and org-icalendar-timezone (string= org-icalendar-timezone "UTC")) ":%Y%m%dT%H%M%SZ") (org-icalendar-timezone ";TZID=%Z:%Y%m%dT%H%M%S") (t ":%Y%m%dT%H%M%S")))) (set icalendar-file (make-temp-file "org-caldav-")) (org-caldav-debug-print 1 (format "Generating ICS file %s." (symbol-value icalendar-file))) (if (featurep (quote ox-icalendar)) (if (version< org-version "8.3beta") (apply (quote org-icalendar--combine-files) nil orgfiles) (apply (quote org-icalendar--combine-files) orgfiles)) (apply (quote org-export-icalendar) t orgfiles)) (find-file-noselect (symbol-value icalendar-file))) org-caldav-generate-ics()

paynito commented 7 years ago

The version I have is:

(setq org-caldav-files `("~/dir/google-cal-1.org"))

I don't know how to add the var org-agenda-files-list and this specific relative path. Entries seem to sync up to the server, but not back down to org-caldav-inbox I get

Contacting host: dav.nextcloud.com:443
ID properties created in file "~/dir/google-cal-1.org"
Putting event 1 of 1
helm-M-x: Error while getting eventlist from     
https://dav.nextcloud.com/principals/uid/a3blah//7215eb4blarg/. Got status code: 404.

Maybe the double // before the 7 in the url is the problem for me.