You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2020-12-03 14:07:07,722] {hxtool_api} {Thread-30} INFO - New controller profile added
[2020-12-03 14:07:07,723] {app} {Thread-30} ERROR - Exception on /api/v1/profile [PUT]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint File "/Users/usrer/HX/HXTool-master/hxtool_api.py", line 3004, in profile
return make_response_by_code(200)
File "/Users/user/HX/HXTool-master/hxtool_util.py", line 69, in make_response_by_code
return (json.dumps(code_table.get(code)), code)
NameError: name 'json' is not defined
And After controller profile Deletion:
[2020-12-03 14:07:36,738] {hxtool_api} {Thread-35} INFO - Controller profile 1faf43ad-2110-49fb-87eb-459b71c3ddc3 deleted.
[2020-12-03 14:07:36,738] {app} {Thread-35} ERROR - Exception on /api/v1/profile/1faf43ad-2110-49fb-87eb-459b71c3ddc3 [DELETE]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint File "/Users/user/HX/HXTool-master/hxtool_api.py", line 3025, in profile_by_id
return make_response_by_code(200)
File "/Users/user/HX/HXTool-master/hxtool_util.py", line 69, in make_response_by_code
return (json.dumps(code_table.get(code)), code)
NameError: name 'json' is not defined
Note that Creation and Deletion are both successful.
The text was updated successfully, but these errors were encountered:
Hi @petelking -
Thanks for the note, much appreciated! Yes, this is indeed a bug. I've fixed it in my branch and it will be merged into master on my next pull request. See f16040d
In the meantime, you can simply add the import to the top of hxtool_util.py and restart HXTool.
Thanks,
Elazar
B0fH
linked a pull request
Dec 29, 2020
that will
close
this issue
after controller profile creation:
[2020-12-03 14:07:07,722] {hxtool_api} {Thread-30} INFO - New controller profile added
[2020-12-03 14:07:07,723] {app} {Thread-30} ERROR - Exception on /api/v1/profile [PUT]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/Users/usrer/HX/HXTool-master/hxtool_api.py", line 3004, in profile
return make_response_by_code(200)
File "/Users/user/HX/HXTool-master/hxtool_util.py", line 69, in make_response_by_code
return (json.dumps(code_table.get(code)), code)
NameError: name 'json' is not defined
And After controller profile Deletion:
[2020-12-03 14:07:36,738] {hxtool_api} {Thread-35} INFO - Controller profile 1faf43ad-2110-49fb-87eb-459b71c3ddc3 deleted.
[2020-12-03 14:07:36,738] {app} {Thread-35} ERROR - Exception on /api/v1/profile/1faf43ad-2110-49fb-87eb-459b71c3ddc3 [DELETE]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/Users/user/HX/HXTool-master/hxtool_api.py", line 3025, in profile_by_id
return make_response_by_code(200)
File "/Users/user/HX/HXTool-master/hxtool_util.py", line 69, in make_response_by_code
return (json.dumps(code_table.get(code)), code)
NameError: name 'json' is not defined
Note that Creation and Deletion are both successful.
The text was updated successfully, but these errors were encountered: