#894174 gcalcli: --nodeclined error

#894174#5
Date:
2018-03-27 02:30:48 UTC
From:
To:
This only happens with --nodeclined:

Traceback (most recent call last):
  File "/usr/bin/gcalcli", line 2649, in <module>
    BowChickaWowWow()
  File "/usr/bin/gcalcli", line 2499, in BowChickaWowWow
    gcal.AgendaQuery()
  File "/usr/bin/gcalcli", line 1737, in AgendaQuery
    self._IterateEvents(start, eventList, yearDate=False)
  File "/usr/bin/gcalcli", line 1556, in _IterateEvents
    attendee = [a for a in event['attendees'] if a['email'] == event['gcalcli_cal']['id']][0]
IndexError: list index out of range

#894174#10
Date:
2018-03-27 06:12:48 UTC
From:
To:
Attached is a patch that appears to solve this. I haven't subjected it
to much testing yet however.

#894174#15
Date:
2019-03-12 00:15:37 UTC
From:
To:
Howdy,

Can you take a look and see if you can still reproduce this issue with 4.0.4-1?
This looks to me as if it should be fixed, and I did not get any traceback when
I tried using the aforementioned option.

~Unit 193
Unit193 @ freenode
Unit193 @ OFTC

#894174#22
Date:
2022-01-11 01:49:24 UTC
From:
To:
close 894174
thanks

Howdy,

With no response in a year, and looking at /usr/lib/python3/dist-packages/gcalcli/gcal.py it seems something like the patch above was included, I'm marking this done.

If you continue to hit this error, please feel free to re-open, or to report upstream.


Thanks,

~Unit 193
Unit193 @ Libera
Unit193 @ OFTC

#894174#27
Date:
2022-01-11 10:05:32 UTC
From:
To:
Unit 193 <unit193@gmail.com> writes:

I didn't respond, because you didn't send the email to me. You didn't
send it to 894174-submitter@bugs.debian.org or my email address.

(yes, I hate this legacy design feature of the BTS)

I will add checking this to my to-do list.

#894174#32
Date:
2022-01-12 21:15:01 UTC
From:
To:
reopen 894174
thanks

It looks like --nodeclined no longer works:

$ gcalcli --calendar brian@linuxpenguins.xyz --nodeclined list
usage: gcalcli [-h] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET]
               [--config-folder CONFIG_FOLDER] [--noincluderc] [--calendar CALENDAR]
               [--default-calendar DEFAULTCALENDAR] [--locale LOCALE] [--refresh] [--nocache] [--conky]
               [--nocolor] [--lineart {fancy,unicode,ascii}]
gcalcli: error: unrecognized arguments: --nodeclined

I am not sure if this was intended or not, but:

* I can't see any indication in the changelog of this option being
  removed. I think the option is still useful (correct me if I am
  wrong).

* /usr/lib/python3/dist-packages/gcalcli/argparsers.py still refers to
  this option:

    output_parser.add_argument(
            '--nodeclined', action='store_true', dest='ignore_declined',
            default=False, help='Hide events that have been declined')


OK, this is just weird, which this misusage nodeclined shows:

$ gcalcli --calendar brian@linuxpenguins.xyz --nodeclined search
usage: gcalcli search [-h]
                      [--details {calendar,location,length,reminders,description,url,conference,attendees,email,attachments,end,all}]
                      [--color-owner COLOR_OWNER] [--color-writer COLOR_WRITER]
                      [--color-reader COLOR_READER] [--color-freebusy COLOR_FREEBUSY]
                      [--color-date COLOR_DATE] [--color-now-marker COLOR_NOW_MARKER]
                      [--color-border COLOR_BORDER] [--color-title COLOR_TITLE] [--tsv] [--nostarted]
                      [--nodeclined] [--width CAL_WIDTH] [--military] [--no-military] [--override-color]
                      text [start] [end]

But if I correct the error, it disappears again:

$ gcalcli --calendar brian@linuxpenguins.xyz --nodeclined search sss
usage: gcalcli [-h] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET]
               [--config-folder CONFIG_FOLDER] [--noincluderc] [--calendar CALENDAR]
               [--default-calendar DEFAULTCALENDAR] [--locale LOCALE] [--refresh] [--nocache] [--conky]
               [--nocolor] [--lineart {fancy,unicode,ascii}]
gcalcli: error: unrecognized arguments: --nodeclined

Apologies if I am misusing the CLI, but I do find this rather confusing.

#894174#39
Date:
2022-01-13 04:49:56 UTC
From:
To:
Howdy,

Yes, sorry about that.  At the time, I had no idea you wouldn't get emailed.  I
was used to bug trackers that would automatically subscribe reporters and email
them on all changes.  And indeed, the mailto: link on the BTS only gives the bug
to respond to.

It was no way trying to slip this one under the radar.

Thanks.

~Unit 193
Unit193 @ Libera
Unit193 @ OFTC