diff --git a/onshape_to_robot/onshape_api/client.py b/onshape_to_robot/onshape_api/client.py index 02f7d14..26ae17b 100644 --- a/onshape_to_robot/onshape_api/client.py +++ b/onshape_to_robot/onshape_api/client.py @@ -15,9 +15,6 @@ import hashlib from pathlib import Path -def double_escape_slash(s): - return s.replace('/', '%252f') - def escape_slash(s): return s.replace('/', '%2f') @@ -341,7 +338,7 @@ def invoke(): def part_get_metadata(self, did, mid, eid, partid, configuration = 'default'): def invoke(): - return self._api.request('get', '/api/parts/d/' + did + '/m/' + mid + '/e/' + eid + '/partid/'+double_escape_slash(partid)+'/metadata', query={'configuration': configuration}) + return self._api.request('get', '/api/parts/d/' + did + '/m/' + mid + '/e/' + eid + '/partid/'+escape_slash(partid)+'/metadata', query={'configuration': configuration}) return json.loads(self.cache_get('metadata', (did, mid, eid, self.hash_partid(partid), configuration), invoke, True))