anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.51k stars 43 forks source link

Using calcure with ICS files doesn't work #47

Closed fhmbrg closed 1 year ago

fhmbrg commented 1 year ago

If configured calcure as shown at https://anufrievroman.gitbook.io/calcure/syncing-with-clouds#reading-from-.ics-files-in-calcure.

When I try to start calcure I get the following error message:

Traceback (most recent call last):
  File "/usr/bin/calcure", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3.10/site-packages/calcure/__main__.py", line 1023, in cli
    curses.wrapper(main)
  File "/usr/lib/python3.10/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python3.10/site-packages/calcure/__main__.py", line 915, in main
    user_ics_tasks = file_repository.load_tasks_from_ics()
  File "/usr/lib/python3.10/site-packages/calcure/repository.py", line 265, in load_tasks_from_ics
    cal = IcsCalendar(ics_text)
  File "/usr/lib/python3.10/site-packages/ics/icalendar.py", line 65, in __init__
    raise NotImplementedError(
NotImplementedError: Multiple calendars in one file are not supported by this method. Use ics.Calendar.parse_multiple()

The pParameters-section of my config.ini file looks as follows:

[Parameters]
# folder_with_datafiles = /home/fh/.config/calcure
ics_task_files = /home/fh/.local/share/vdirsyncer/frank_tasks/MzM.ics
ics_event_files = /home/fh/.local/share/vdirsyncer/frank_events/Y2FsOi8vMC8zMQ.ics
calcurse_todo_file = No
calcurse_events_file = No
taskwarrior_folder = /home/fh/.task
language = en
default_view = calendar
default_calendar_view = monthly
birthdays_from_abook = Yes
show_keybindings = Yes
privacy_mode = No
show_weather = Yes
weather_city = Niederzier
minimal_today_indicator = Yes
minimal_days_indicator = Yes
minimal_weekend_indicator = Yes
show_calendar_boarders = No
cut_titles_by_cell_length = No
ask_confirmations = Yes
use_unicode_icons = Yes
show_current_time = No
show_holidays = Yes
show_nothing_planned = Yes
one_timer_at_a_time = No
holiday_country = Germany
use_persian_calendar = No
start_week_day = 1
weekend_days = 6,7
refresh_interval = 1
split_screen = Yes
right_pane_percentage = 25
journal_header = JOURNAL
event_icon = •
privacy_icon = •
today_icon = •
birthday_icon = ★
holiday_icon = ⛱
hidden_icon = ...
done_icon = ✔
todo_icon = •
important_icon = ‣
separator_icon = │
deadline_icon = ⚑

Everything else in the config.ini file is default

anufrievroman commented 1 year ago

Could you please check which version you are using (hit ? in the program), and upgrade to version 2.8 if it's not that one? pip install --upgrade calcure

anufrievroman commented 1 year ago

This is reminiscent of #41 but I thought we fixed that. Anyways, you'll need to separate different 'calendars' into different files. Could you also show how you set up address in vdirsyncer?

fhmbrg commented 1 year ago

Thanks for pointing me in the right direction. Installing calcure via pip did the trick, before I've used an AUR package which was version 2.7.1.

Your hint regarding separation of different calendars into dedicated files I've noticed in the before mentioned documentation section.