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

AttributeError: 'ConnectionError' object has no attribute 'message' #54

Open
johnsca opened this issue Aug 14, 2017 · 1 comment
Open

Comments

@johnsca
Copy link
Contributor

johnsca commented Aug 14, 2017

The original failure that caused this was a DNS resolution failure, but in attempting to turn that into a ServerError, theblues failed with this. Using something like str(exc) would be safest, but you could also do something with getattr(). I think some exception types use msg rather than message, as well.

AttributeError: 'ConnectionError' object has no attribute 'message'
  File "conjureup/controllers/deploy/tui.py", line 34, in do_deploy
    await asyncio.gather(*tasks)
  File "conjureup/juju.py", line 622, in deploy_service
    app_inst = await app.juju.client.deploy(**deploy_args)
  File "juju/model.py", line 1081, in deploy
    entity = await self.charmstore.entity(entity_url, channel=channel)
  File "juju/model.py", line 1926, in coro
    return await self.loop.run_in_executor(None, method)
  File "concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "theblues/charmstore.py", line 136, in entity
    return self._meta(entity_id, includes, channel=channel)
  File "theblues/charmstore.py", line 107, in _meta
    data = self._get(url)
  File "theblues/charmstore.py", line 83, in _get
    message=exc.message)
@johnsca
Copy link
Contributor Author

johnsca commented Sep 11, 2017

Got this for a ProxyError type as well:

AttributeError: 'ProxyError' object has no attribute 'message'
  File "conjureup/controllers/deploy/gui.py", line 245, in _do_deploy
    await juju.deploy_service(application, default_series, msg_cb=msg_cb)
  File "conjureup/juju.py", line 622, in deploy_service
    app_inst = await app.juju.client.deploy(**deploy_args)
  File "juju/model.py", line 1081, in deploy
    entity = await self.charmstore.entity(entity_url, channel=channel)
  File "juju/model.py", line 1926, in coro
    return await self.loop.run_in_executor(None, method)
  File "concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "theblues/charmstore.py", line 136, in entity
    return self._meta(entity_id, includes, channel=channel)
  File "theblues/charmstore.py", line 107, in _meta
    data = self._get(url)
  File "theblues/charmstore.py", line 83, in _get
    message=exc.message)

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

1 participant