Closed erezzarum closed 6 years ago
Hmmm, that traceback does not look complete, can you try to get the whole of it? That will help a lot.
Thanks!
Exactly, i tried to debug it but this is all i managed to get out :( Edit: same on python3.5.2
The problem looks to be related to foreman's API now introducing "import" via API. It tries to build a function definition named "import" which is illegal. I'm not sure how is it going to affect (so far it's working), but i did a very quick hack to get it working for me: At line 129 in client.py:
self.name = self._get_name()
if self.name == "import":
self.name = "import_"
Can you send a pull request? If you can with the foreman api definiton too (https://github.com/david-caro/python-foreman/tree/master/foreman/definitions), you can find the one for your foreman version in the cache dire (usually ~/.python-foreman).
Good catch!
If you don't have time, pass me the api definition at least so I can add it ;)
Fixed in #84 👏
foreman-python 0.4.14 requests 2.6.0 six 1.9.0
This does not happen when api_version=1, it manages to fetch the json file for both v1 and v2, though the v2 version is very big, about 1.5MB.