martyzz1 / heroku3.py

This is the updated Python wrapper for the Heroku API V3. https://devcenter.heroku.com/articles/platform-api-reference The Heroku REST API allows Heroku users to manage their accounts, applications, addons, and other aspects related to Heroku. It allows you to easily utilize the Heroku platform from your applications.
Other
118 stars 73 forks source link

KeyError while calling update_appconfig() #74

Closed viseshrp closed 5 years ago

viseshrp commented 5 years ago
>>> import os
>>> import heroku3
>>> heroku_conn = heroku3.from_key(os.environ['HEROKU_API_KEY'])
>>> updated_config = heroku_conn.update_appconfig(app_id_or_name='visesh', config={'DEBUG':'True'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/....../virtualenvs/pyenv/lib/python3.7/site-packages/heroku3/api.py", line 502, in update_appconfig
    return ConfigVars.new_from_dict(item, h=self)
  File "/....../virtualenvs/pyenv/lib/python3.7/site-packages/heroku3/models/configvars.py", line 107, in new_from_dict
    c = cls(d, kwargs.pop('app'), h=h, **kwargs)
KeyError: 'app'
bugsduggan commented 5 years ago

Looks like this commit 68d496e94a21063c950da015c1a0b0cb4824833e transposed kwargs.get to kwargs.pop. This stackoverflow post summarises the difference.