gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

--noauth_local_webserver isn't recognised as a command line flag

Open alarazr opened this issue 7 years ago • 8 comments

Hi, I'm remotely installing gcalcli on a server, and when I try

gcalcli --noauth_local_webserver

I get

Unknown command line flag 'noauth_local_webserver'

Any ideas? Thanks for your help

alarazr avatar Jan 15 '17 09:01 alarazr

Ditto

PhilHudson avatar Feb 13 '17 23:02 PhilHudson

I got that once with

gcalcli list --noauth_local_webserver

but as long as the command is authenticated and output is correct then the unknown command line message is inconsequential I think.

ghost avatar Feb 14 '17 02:02 ghost

Sounds like you are running 3.4 with a newer version of gflags and/or google python client code. 3.4 only works with very, very specific versions of the libraries as defined in the setup.py. 4.0.0alpha2 should work with the latest versions of everything (but might still have some sharp edges.)

tresni avatar Feb 21 '17 00:02 tresni

Is it any possible to run with this cmdline option specified using gcalcli v3.2? Or is it supported only >=3.4?

yermulnik avatar Nov 24 '17 11:11 yermulnik

This still doesn't work even with the 4.0.0a1 version.

FlowDelPlaya avatar Sep 19 '18 20:09 FlowDelPlaya

Doesn't work on 4.0.0a2, doesn't work on 4.0.0a4.

FlowDelPlaya avatar Sep 19 '18 21:09 FlowDelPlaya

On current master this seems to work as expected (for me):

I tried on python3.5 and on python2.7

(venv) ~/src/gcalcli$ gcalcli --noauth_local_webserver agenda
/home/jcrowgey/src/gcalcli/venv/lib/python3.5/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /home/jcrowgey/.gcalcli_oauth: No such file or directory
  warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=urn...REDACTED

Enter verification code: Enter verification code: REDACTED
Authentication successful.
...
(venv) ~/src/gcalcli$ rm ~/.gcalcli_oauth 
(venv) ~/src/gcalcli$ rm ~/gcalcli_cache
(venv) ~/src/gcalcli$ deactivate 
$ . venv27/bin/activate
(venv27) ~/src/gcalcli$ gcalcli --noauth_local_webserver agenda
/home/jcrowgey/src/gcalcli/venv27/local/lib/python2.7/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /home/jcrowgey/.gcalcli_oauth: No such file or directory
  warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Furlshortener&redirect_uri=REDACTED
Enter verification code: REDACTED
Authentication successful.

I need more detail in order to help.

...

jcrowgey avatar Sep 26 '18 05:09 jcrowgey

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