My simple code is show below:
Code: Select all
from coppeliasim_zmqremoteapi_client import RemoteAPIClient
client = RemoteAPIClient()
sim = client.require('sim')
sim.setStepping(True)
Code: Select all
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[2], line 2
1 client = RemoteAPIClient()
----> 2 sim = client.require('sim')
3 sim.setStepping(True)
File ~/anaconda3/envs/IBVS_VIC/lib/python3.8/site-packages/coppeliasim_zmqremoteapi_client/__init__.py:176, in RemoteAPIClient.require(self, name)
174 ret = self.requiredItems[name]
175 else:
--> 176 self.call('zmqRemoteApi.require', [name])
177 ret = self.getObject(name)
178 return ret
File ~/anaconda3/envs/IBVS_VIC/lib/python3.8/site-packages/coppeliasim_zmqremoteapi_client/__init__.py:150, in RemoteAPIClient.call(self, func, args)
148 if 'err' in reply:
149 raise Exception(reply.get('err')) # __EXCEPTION__
--> 150 return self._process_response(reply)
File ~/anaconda3/envs/IBVS_VIC/lib/python3.8/site-packages/coppeliasim_zmqremoteapi_client/__init__.py:115, in RemoteAPIClient._process_response(self, resp)
114 def _process_response(self, resp):
--> 115 ret = resp['ret']
116 if len(ret) == 1:
117 return ret[0]
KeyError: 'ret'
How can I do? Thanks for a lot!!!