thefactory/marathon-python

__init__() got an unexpected keyword argument 'port_mappings'

Closed this issue · 2 comments

the version of marathon is 1.10.2, and the version of marathon-python is 0.9.3, then I run marathonClient.list_apps() with marathon-python, got a problem:

Traceback (most recent call last):
File "", line 1, in
File "/Users/jack/workspace/venv/lib/python2.7/site-packages/marathon/client.py", line 197, in list_apps
'app.tasks': embed_tasks,
File "/Users/jack/workspace/venv/lib/python2.7/site-packages/marathon/client.py", line 63, in _parse_response
def repr(self):
File "/Users/jack/workspace/venv/lib/python2.7/site-packages/marathon/models/base.py", line 43, in from_json
return cls({to_snake_case(k): v for k, v in attributes.items()})
File "/Users/jack/workspace/venv/lib/python2.7/site-packages/marathon/models/app.py", line 113, in init
else MarathonContainer.from_json(container)
File "/Users/jack/workspace/venv/lib/python2.7/site-packages/marathon/models/base.py", line 43, in from_json
return cls(
{to_snake_case(k): v for k, v in attributes.items()})
TypeError: init() got an unexpected keyword argument 'port_mappings'

This surprises me, as it should have been fixed in marathon-python 0.9.1
https://github.com/thefactory/marathon-python/blob/master/CHANGELOG.md#091-2017-09-06

with #213

Sorry, that is caused by my test environment.

I test list_apps() at Pycharm-PythonConsole with marathon-python:0.9.0, then I update that to 0.9.3, but the version of marathon-python in PythonConsole is still 0.9.0.