ansible dynamic inventory script with gce is not working

Hi,

I am trying to test ansible dynamic inventory script with gce.py & gce.ini …as explained here:

https://docs.ansible.com/ansible/2.5/scenario_guides/guide_gce.html#introduction

When I run below instructions:

$ ./gce.py --list

It gives below error:
Please Go to the following URL and sign in:
<oauth url>
Enter Code: ^CTraceback (most recent call last):
  File "./gce.py", line 537, in <module>
    GceInventory()
  File "./gce.py", line 168, in __init__
    self.drivers = self.get_gce_drivers()
  File "./gce.py", line 330, in get_gce_drivers
    gce = get_driver(Provider.GCE)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 1052, in __init__
    super(GCENodeDriver, self).__init__(user_id, key, **kwargs)
  File "/usr/lib/python2.7/dist-packages/libcloud/common/base.py", line 1103, in __init__
    self.connection = self.connectionCls(*args, **conn_kwargs)
  File "/usr/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 97, in __init__
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/libcloud/common/google.py", line 668, in __init__
    self._init_oauth2(**kwargs)
  File "/usr/lib/python2.7/dist-packages/libcloud/common/google.py", line 800, in _init_oauth2
    self.oauth2_token = self.oauth2_conn.get_new_token()
  File "/usr/lib/python2.7/dist-packages/libcloud/common/google.py", line 425, in get_new_token
    code = self.get_code()
  File "/usr/lib/python2.7/dist-packages/libcloud/common/google.py", line 413, in get_code
    code = raw_input('Enter Code: ')
KeyboardInterrupt


Any help ???