Problem in V-REP setup mac using jupiter notes python 3 and V-REP_PRO_V3_6_2_Mac

Hi everyone,

After looking for similar problems on installation I made the step of asking as I don’t know what else to do to control a poppy humanoid using jupiter notes python 3 and vrep. I am using the V-REP_PRO_V·_6_2 for mac as the CoppeliaSim_Edu_V4_0_0_Mac crashes in a Mojave 10.14.6 mac. The problem is at start up,with this code:

from pypot.vrep import from_vrep
from pypot.creatures import PoppyHumanoid
poppy = PoppyHumanoid(simulator='vrep')

And the logs returned are:

---------------------------------------------------------------------------
VrepConnectionError                       Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/pypot/creatures/abstractcreature.py in __new__(cls, base_path, config, simulator, scene, host, port, id, shared_vrep_io, use_snap, snap_host, snap_port, snap_quiet, use_http, http_host, http_port, http_quiet, use_remote, remote_host, remote_port, use_ws, ws_host, ws_port, start_background_services, sync, **extra)
    102                 try:
--> 103                     poppy_creature = from_vrep(config, host, port, scene if scene != "keep-existing" else None, id=id, shared_vrep_io=shared_vrep_io)
    104                 except VrepConnectionError:

~/anaconda3/lib/python3.7/site-packages/pypot/vrep/__init__.py in from_vrep(config, vrep_host, vrep_port, scene, tracked_objects, tracked_collisions, id, shared_vrep_io)
     87     if shared_vrep_io is None:
---> 88         vrep_io = VrepIO(vrep_host, vrep_port)
     89     else:

~/anaconda3/lib/python3.7/site-packages/pypot/vrep/io.py in __init__(self, vrep_host, vrep_port, scene, start)
     69 
---> 70         self.open_io()
     71 

~/anaconda3/lib/python3.7/site-packages/pypot/vrep/io.py in open_io(self)
     80             raise VrepConnectionError(
---> 81                 msg.format(self.vrep_host, self.vrep_port))
     82 

VrepConnectionError: Could not connect to V-REP server on 127.0.0.1:19997. This could also means that you still have a previously opened connection running! (try pypot.vrep.close_all_connections())

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-17-889d6cdca68e> in <module>
      1 # poppy = PoppyHumanoid(simulator='vrep')
      2 # poppy = PoppyTorso(use_http=True, simulator='vrep')
----> 3 poppy = PoppyErgoJr(simulator='vrep', use_snap=True)

~/anaconda3/lib/python3.7/site-packages/pypot/creatures/abstractcreature.py in __new__(cls, base_path, config, simulator, scene, host, port, id, shared_vrep_io, use_snap, snap_host, snap_port, snap_quiet, use_http, http_host, http_port, http_quiet, use_remote, remote_host, remote_port, use_ws, ws_host, ws_port, start_background_services, sync, **extra)
    103                     poppy_creature = from_vrep(config, host, port, scene if scene != "keep-existing" else None, id=id, shared_vrep_io=shared_vrep_io)
    104                 except VrepConnectionError:
--> 105                     raise IOError('Connection to V-REP failed!')
    106 
    107             elif simulator == 'poppy-simu':

OSError: Connection to V-REP failed!

Any help is very much appreciated, thank you!! :smiley:

Could you check that VRep is actually listening on port 19997?

Thanks.
I just had the same issue, and could solve it by typing in the vrep sandbox script (coppeliasim 4.3) :

simExtRemoteApiStart(19997)
1 Like