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

Unhandled python exception in read callback: UnboundLocalError: local variable 'stats' referenced before assignment #20

Open
ssbarnea opened this issue Jan 18, 2017 · 1 comment

Comments

@ssbarnea
Copy link

./collectd -T
openstack-keystone: failed to get stats :: Authorization Failed: The resource could not be found. (HTTP 404) (Request-ID: req-56dd66a4-b85b-446c-8f29-05e6a622f2eb) :: Traceback (most recent call last):
  File "/home/fedora/collectd-openstack/plugins/base.py", line 138, in read_callback
    stats = self.get_stats()
  File "/home/fedora/collectd-openstack/plugins/keystone_plugin.py", line 45, in get_stats
    keystone = self.get_keystone()
  File "/home/fedora/collectd-openstack/plugins/base.py", line 50, in get_keystone
    tenant_name=self.tenant, auth_url=self.auth_url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v2_0/client.py", line 152, in __init__
    self.authenticate()
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 503, in authenticate
    resp = self.get_raw_token_from_identity_service(**kwargs)
  File "/usr/lib/python2.7/site-packages/keysto
Unhandled python exception in read callback: UnboundLocalError: local variable 'stats' referenced before assignment
Traceback (most recent call last):
  File "/home/fedora/collectd-openstack/plugins/keystone_plugin.py", line 78, in read_callback
    plugin.read_callback()
  File "/home/fedora/collectd-openstack/plugins/base.py", line 144, in read_callback
    self.dispatch(stats)
UnboundLocalError: local variable 'stats' referenced before assignment
read-function of plugin `python.keystone_plugin' failed.
openstack-nova: failed to get stats :: Authorization Failed: The resource could not be found. (HTTP 404) (Request-ID: req-8a5e2dbc-98cf-41b0-8442-f1c0c7f41a47) :: Traceback (most recent call last):
  File "/home/fedora/collectd-openstack/plugins/base.py", line 138, in read_callback
    stats = self.get_stats()
  File "/home/fedora/collectd-openstack/plugins/nova_plugin.py", line 48, in get_stats
    keystone = self.get_keystone()
  File "/home/fedora/collectd-openstack/plugins/base.py", line 50, in get_keystone
    tenant_name=self.tenant, auth_url=self.auth_url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v2_0/client.py", line 152, in __init__
    self.authenticate()
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 503, in authenticate
    resp = self.get_raw_token_from_identity_service(**kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient
Unhandled python exception in read callback: UnboundLocalError: local variable 'stats' referenced before assignment
Traceback (most recent call last):
  File "/home/fedora/collectd-openstack/plugins/nova_plugin.py", line 113, in read_callback
    plugin.read_callback()
  File "/home/fedora/collectd-openstack/plugins/base.py", line 144, in read_callback
    self.dispatch(stats)
UnboundLocalError: local variable 'stats' referenced before assignment
@mcronce
Copy link

mcronce commented Apr 5, 2018

I am seeing exactly this problem on Pike

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

2 participants