我在文件 say.py 中使用 Python SDK 编写了一个简单的程序。 Aldebaran Nao 连接到 IP 172.26.96.164 的网络
from naoqi import ALProxy
pr = ALProxy("ALTextToSpeech", "172.26.96.164", 9559)
pr.say("Hello, You are awesome !")
代码运行良好。但是当我在电脑上启动本地版Naoqi
> & 'C:\Program Files (x86)\Aldebaran\Choregraphe 1.12.5.3\bin\naoqi-bin.exe'
say.py 的代码停止运行并出现以下错误。
PS C:\Users\admin\Desktop\nehchal> python say.py
[INFO ] Starting ALNetwork
[ERROR] Connection failed ! Port 54010 is already in use. Are you already running NaoQi? Use --broker-port option to specify a different port.
[INFO ] Stopping ALNetwork
[INFO ] Exit
Traceback (most recent call last):
File "say.py", line 2, in <module>
pr = ALProxy("ALTextToSpeech", "172.26.96.164", 9559)
File "C:\Python27\lib\site-packages\naoqi.py", line 230, in __init__
inaoqi.proxy.__init__(self, args[0], args[1], args[2])
File "C:\Python27\lib\site-packages\inaoqi.py", line 322, in __init__
this = _inaoqi.new_proxy(*args)
RuntimeError: ALBroker::runBroker
Port 54010 is not free. Another broker is using this port.
有人可以解释一下这个错误到底意味着什么吗?如何知道谁在使用这个端口?如何释放端口或如何使用备用端口?
我是一名优秀的程序员,十分优秀!