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

Local variable 'response' referenced before assignment #30

Open
vishalvpv opened this issue Jul 29, 2016 · 2 comments
Open

Local variable 'response' referenced before assignment #30

vishalvpv opened this issue Jul 29, 2016 · 2 comments

Comments

@vishalvpv
Copy link

File "/var/lib/ambari-agent/cache/stacks/HDP/2.4/services/ZEPPELIN/package/scripts/master.py", line 230, in post_request

jsonresp = json.loads(response.decode('utf-8'))
UnboundLocalError: local variable 'response' referenced before assignment

Above assignment should only be done if exception does not occur.

@appym
Copy link

appym commented Dec 12, 2016

I get the same issue

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.4/services/ZEPPELIN/package/scripts/master.py", line 234, in <module>
    Master().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.4/services/ZEPPELIN/package/scripts/master.py", line 178, in start
    self.update_zeppelin_interpreter()
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.4/services/ZEPPELIN/package/scripts/master.py", line 210, in update_zeppelin_interpreter
    self.post_request(zeppelin_int_url + hivebody['id'], hivebody)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.4/services/ZEPPELIN/package/scripts/master.py", line 229, in post_request
    jsonresp = json.loads(response.decode('utf-8'))
UnboundLocalError: local variable 'response' referenced before assignment

@appym
Copy link

appym commented Dec 13, 2016

I manually made the code change suggested here and then restarted the ambari-server to make it work.
ec4428c

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