gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

Arguments seemingly not being passed

Open csik opened this issue 4 years ago • 4 comments

Hi, I'm getting this result on os x:

>gcalcli --client-id xxx.apps.googleusercontent.com --client-secret yyy list
usage: gcalcli [-h] [--auth_host_name AUTH_HOST_NAME]
               [--noauth_local_webserver]
               [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]
               [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
               [--version] [--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}]
               {list,search,edit,delete,agenda,updates,calw,calm,quick,add,import,remind}
               ...
gcalcli: error: argument command: invalid choice: '' (choose from 'list', 'search', 'edit', 'delete', 'agenda', 'updates', 'calw', 'calm', 'quick', 'add', 'import', 'remind')
>

I've tried with any argument installations from git and pip, both in my homebrew python3.7.6 and in virtual envs. The environment seems to otherwise be working. "which" yields that the gcalcli and python are on the same paths. Ideas?

csik avatar Feb 28 '20 19:02 csik

I wish I could help. I can't repro this on Linux. I think there are macos users of gcalcli though, so maybe someone else can advise.

jcrowgey avatar Feb 29 '20 03:02 jcrowgey

This happened to me, too. If you have a ~/.gcalclirc file, it cannot contain any blank lines. Make sure any blank lines are removed (including at the end of the file), and try again

cahna avatar May 13 '20 20:05 cahna

@cahna This fixed the problem for me (linux btw.). Thanks a lot!

StanSvec avatar Sep 29 '21 07:09 StanSvec

Revisiting this in case someone else runs into this issue. I was able to resolve it by changing my command order. I originally typed the command in the order: gcalcli --client-id=xxxxxxxxxxxxxxx.apps.googleusercontent.com --client-secret=xxxxxxxxxxxxxxxxx --noauth_local_webserver which gave the above error. When I changed the order to be gcalcli --client-id=xxxxxxxxxxxxxxx.apps.googleusercontent.com --client-secret=xxxxxxxxxxxxxxxxx --noauth_local_webserver then I was able to get it to work without issue. Notice the change is the location of

jpcaldwell30 avatar Jan 10 '22 20:01 jpcaldwell30