Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when empty line in .ics file #2

Open
ni720 opened this issue Jan 15, 2021 · 0 comments
Open

error when empty line in .ics file #2

ni720 opened this issue Jan 15, 2021 · 0 comments

Comments

@ni720
Copy link

ni720 commented Jan 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant