pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.62k stars 207 forks source link

Crash on import #1210

Open CaptainQuirk opened 1 year ago

CaptainQuirk commented 1 year ago

Hello !

I'm trying to import an ics file exported manually from Outlook with khal 0.10.5 installed with homebrew on Linux Mint 21

I created a configuration file with khal configure and edited. This is the actual file. Worth mentioning is that the directory the path configuration field points to exists. It was created by khal with mode 775 and it belongs to me:me !

[calendars]
  [[work]]
    path = ~/.local/share/khal/work
    color = dark green
    readonly = True
    type = calendar

[locale]
timeformat = %H:%M
dateformat = %d/%m/%Y
longdateformat = %d/%m/%Y
datetimeformat = %d/%m/%Y %H:%M
longdatetimeformat = %d/%m/%Y %H:%M

When I execute

$ khal import -a work ~/Téléchargements/calendar.ics

It prints the first event available and then the following error message :

critical: No writable calendars found, aborting import.

I guess I'm doing something dumb :smile:

WhyNotHugo commented 1 year ago

Your only calendar is read-only. You can't import events into a read-only calendar.

geier commented 1 year ago

Is khal actually crashing? If so, please also provide the output of khal (the stack trace).

As @WhyNotHugo pointed out, the behaviour is sensible, but it should not crash but end with an error message.