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
pidify_1 | self.__handle_client.modify_handle_value(handle, **record_kv)
pidify_1 | File "/usr/local/lib/python3.12/site-packages/pyhandle/client/resthandleclient.py", line 490, in modify_handle_value
pidify_1 | return self.__handle_modification(handle, ttl, add_if_not_exist, overwrite, **kvpairs)
pidify_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pidify_1 | File "/usr/local/lib/python3.12/site-packages/pyhandle/client/resthandleclient.py", line 602, in __handle_modification
pidify_1 | return json.loads(decoded_response(resp))['handle']
pidify_1 | ^^^^
pidify_1 | UnboundLocalError: cannot access local variable 'resp' where it is not associated with a value
The text was updated successfully, but these errors were encountered:
This is a bug that can occur when we try to modify a handle record (via REST client), but pass an empty dict of changes.
In that case, pyhandle will try to return a variable that is not assigned, here:
https://github.com/EUDAT-B2HANDLE/PYHANDLE/blob/master/pyhandle/client/resthandleclient.py#L602
When the variable
nothingchanges
is True, the variableresp
never gets defined or assigned, so we run into an exception here:https://github.com/EUDAT-B2HANDLE/PYHANDLE/blob/master/pyhandle/client/resthandleclient.py#L578
The text was updated successfully, but these errors were encountered: