vrep-api-python icon indicating copy to clipboard operation
vrep-api-python copied to clipboard

Connecting to server

Open psychemedia opened this issue 6 years ago • 3 comments

Trying to connect to the server using with VRep.connect(domain, 19997) as api:, the connection works if I use domain="127.0.0.1" but fails if I use an alias such as domain="localhost" or domain="mydomain":

---------------------------------------------------------------------------
ReturnCommandError                        Traceback (most recent call last)
<ipython-input-7-90f793041880> in <module>()
     31 
     32 
---> 33 with VRep.connect("localhost", 19997) as api:
     34     r = lineFollower(api)
     35     r.fwd_right()

/usr/local/lib/python3.5/dist-packages/pyrep/api.py in connect(ip, port)
     26             return VRepApi(res)
     27         else:
---> 28             raise ReturnCommandError(res)
     29 
     30     def close_connection(self):

ReturnCommandError: Undefined return code: -1

psychemedia avatar Sep 08 '17 15:09 psychemedia