Skip to content

error when empty line in .ics file #2

@ni720

Description

@ni720

thanks for this handy tool!

when i started the conversion it gave this error:


Traceback (most recent call last):
  File "ics_to_todotxt.py", line 188, in <module>
    sys.exit(main(sys.argv))
  File "ics_to_todotxt.py", line 155, in main
    todos = ICSParser(codecs.open(input_file_name,
  File "ics_to_todotxt.py", line 53, in __init__
    if line[0] == ' ':
IndexError: string index out of range

In my case it was due to an empty line in the description of an event or a line with just spaces in it.

Filtering out all "empty" lines before parsing should fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions