flavorjones/calendar-assistant

undefined method `ascii_tree` for nil:NilClass

tkunze opened this issue · 4 comments

I installed according to the .md file, ran through setup and authorization but calendar-assistant can't parse the ~/.calendar-assistant file:

% calendar-assistant version
ERROR: could not parse TOML file '/Users/tkunze/.calendar-assistant': undefined method `ascii_tree' for nil:NilClass

Any idea what I could do?

Here is the .calendar-assistant file, obfuscated, obviously.


[tokens]
foo@bar.com = "{\"client_id\":\"284739576412-1eh38dfgv569sh4859fh02907g0lvjbs.apps.googleusercontent.com\",\"access_token\":\"ya92.a0AH6SMCDfjxh5JaYhedI8v9jdKLlPSmSJIIDTgUbjjYMVozLUTSy8Ch4tw94-9lLPR54OfvGEPxMjemePt_05whxU1zs6CCahx7v1Ks7zIvAMB4uJgEhZbVMAGSmWj2AArYl1DrDj_FRAQB0Q2IdyvVC4gkgA\",\"refresh_token\":\"1//0A3Z_R7D0b9jWkRIARAATGQSNAxF-LIrPg9Q_CvHV1NajieqDCFJko63jfhTyshS135ynLIU1yMypYJ8VkyqGIUM_fueI83bHSb4\",\"scope\":[\"https://www.googleapis.com/auth/calendar\"],\"expiration_time_millis\":1619842978000}"

@tkunze Thanks for opening an issue! I'm trying to reproduce what you're seeing now.

@tkunze Ah! It seems that the TOML parser doesn't like the "." character in your token name.

As a short-term workaround, consider renaming that profile to something without that character; and I'll spend a few minutes now to see if I can make fix calendar-assistant to work properly in this case.

I've released v0.15.0 which fixes this! You will need to edit your .calendar-assistant file to wrap the profile name foo@bar.com in quotes (i.e., "foo@bar.com"); or just nuke the file and re-authorize.

Fantastic!! Works 😀 Thanks so much!