Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does marathon-python supports marathon Version 0.11.1? #66

Closed
junneyang opened this issue Nov 5, 2015 · 2 comments
Closed

does marathon-python supports marathon Version 0.11.1? #66

junneyang opened this issue Nov 5, 2015 · 2 comments

Comments

@junneyang
Copy link

thanks

@cmoad
Copy link

cmoad commented Nov 5, 2015

Seeing issues as well. Here is the output from two simple commands:

In [8]: c.list_apps()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-a3d90c55bb14> in <module>()
----> 1 c.list_apps()

C:\Python2\lib\site-packages\marathon\client.pyc in list_apps(self, cmd, embed_tasks, embed_failures, **kwargs)
    138
    139         response = self._do_request('GET', '/v2/apps', params=params)
--> 140         apps = self._parse_response(response, MarathonApp, is_list=True, resource_name='apps')
    141         for k, v in kwargs.items():
    142             apps = [o for o in apps if getattr(o, k) == v]

C:\Python2\lib\site-packages\marathon\client.pyc in _parse_response(response, clazz, is_list, resource_name)
     53         target = response.json()[resource_name] if resource_name else response.json()
     54         if is_list:
---> 55             return [clazz.from_json(resource) for resource in target]
     56         else:
     57             return clazz.from_json(target)

C:\Python2\lib\site-packages\marathon\models\base.pyc in from_json(cls, attributes)
     32         :param dict attributes: object attributes from parsed response
     33         """
---> 34         return cls(**{to_snake_case(k): v for k,v in attributes.items()})
     35
     36     def to_json(self, minimal=True):

TypeError: __init__() got an unexpected keyword argument 'version_info'
In [7]: c.get_info()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-eb9289f78552> in <module>()
----> 1 c.get_info()

C:\Python2\lib\site-packages\marathon\client.pyc in get_info(self)
    517         """
    518         response = self._do_request('GET', '/v2/info')
--> 519         return self._parse_response(response, MarathonInfo)
    520
    521     def get_leader(self):

C:\Python2\lib\site-packages\marathon\client.pyc in _parse_response(response, clazz, is_list, resource_name)
     55             return [clazz.from_json(resource) for resource in target]
     56         else:
---> 57             return clazz.from_json(target)
     58
     59     def _do_request(self, method, path, params=None, data=None):

C:\Python2\lib\site-packages\marathon\models\base.pyc in from_json(cls, attributes)
     32         :param dict attributes: object attributes from parsed response
     33         """
---> 34         return cls(**{to_snake_case(k): v for k,v in attributes.items()})
     35
     36     def to_json(self, minimal=True):

C:\Python2\lib\site-packages\marathon\models\info.pyc in __init__(self, event_subscriber, framework_id, http_config, leader, marathon_config, name, version, elected, zookeeper_config)
     35         self.leader = leader
     36         self.marathon_config = marathon_config if isinstance(marathon_config, MarathonConfig) \
---> 37             else MarathonConfig().from_json(marathon_config)
     38         self.name = name
     39         self.version = version

C:\Python2\lib\site-packages\marathon\models\base.pyc in from_json(cls, attributes)
     32         :param dict attributes: object attributes from parsed response
     33         """
---> 34         return cls(**{to_snake_case(k): v for k,v in attributes.items()})
     35
     36     def to_json(self, minimal=True):

TypeError: __init__() got an unexpected keyword argument 'mesos_leader_ui_url'

@solarkennedy
Copy link
Contributor

Fixed by #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants