libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Bulcher (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-970) GCE driver: __init__() missing 1 required positional argument: 'secure'
Date Tue, 19 Dec 2017 16:54:03 GMT
John Bulcher created LIBCLOUD-970:
-------------------------------------

             Summary: GCE driver: __init__() missing 1 required positional argument: 'secure'
                 Key: LIBCLOUD-970
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-970
             Project: Libcloud
          Issue Type: Bug
         Environment: - libcloud 2.2.1 or 2.2.0
- python 3.5.2
- virtualenv
- GCE service account with a json credential file
            Reporter: John Bulcher


Python code looks like this:

{code:python}
    from libcloud.compute.types import Provider
    from libcloud.compute.providers import get_driver

    def run():
        """ Run this script
        """
        ComputeEngine = get_driver(Provider.GCE)
        driver = ComputeEngine(user_id='****@****.com',
                               credential_file='serviceaccount.json',
                               project='****')

    run()
{code}

When I run my code, I'm getting:

{code}
    Traceback (most recent call last):
      File "./myscript.py", line 47, in <module>
        run()
      File "./myscript.py", line 21, in run
        project='ebs-it', secure=True)
      File "/***/virtualenv/lib/python3.5/site-packages/libcloud/compute/drivers/gce.py",
line 1795, in __init__
        super(GCENodeDriver, self).__init__(user_id, key, **kwargs)
      File "/***/virtualenv/lib/python3.5/site-packages/libcloud/common/base.py", line 975,
in __init__
        self.connection = self.connectionCls(*args, **conn_kwargs)
    TypeError: __init__() missing 1 required positional argument: 'secure'
{code}

This looks [perfectly textbook](http://libcloud.readthedocs.io/en/latest/compute/drivers/gce.html)
to me.  I created a [stackstorm question here](https://stackoverflow.com/questions/47877954/libcloud-missing-1-required-positional-argument-error-during-driver-init),
but the more I look into it the more it looks like a bug. E.g., if I don't specify `user_id`
 and `credential_file`, libcloud asks me to load a URL and type a code; since I'm using a
service account, I shouldn't need to do  this (I think).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message