Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to establish a new connection: [Errno 61] Connection refused #1

Open
Acorn2 opened this issue Apr 26, 2022 · 4 comments
Open

Comments

@Acorn2
Copy link

Acorn2 commented Apr 26, 2022

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x1125e5730>: Failed to establish a new connection: [Errno 61] Connection refused

按照示例代码进行语音识别,会报错。
image

个人其实不理解为什么要访问本地的20001端口。

@nl8590687
Copy link
Owner

https://github.com/nl8590687/ASRT_SpeechRecognition
SDK需要调用ASRT语音识别服务的API接口,应用接入SDK后会通过网络调用服务端
https://wiki.ailemon.net/docs/asrt-doc
请按照ASRT语音识别项目文档上的步骤去操作

@Acorn2
Copy link
Author

Acorn2 commented Apr 27, 2022

https://github.com/nl8590687/ASRT_SpeechRecognition SDK需要调用ASRT语音识别服务的API接口,应用接入SDK后会通过网络调用服务端 https://wiki.ailemon.net/docs/asrt-doc 请按照ASRT语音识别项目文档上的步骤去操作

感谢回复,我去试一下

@ryanbest
Copy link

ryanbest commented May 4, 2022

您好,我按照了要求setup了服务器和pythonSDK 但是还是出了下面的错误
`Traceback (most recent call last):
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 440, in send
resp = conn.urlopen(
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\client_example.py", line 34, in
result = speech_recognizer.recognite_file(FILENAME)
File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\asrt_sdk\speech_recognizer.py", line 153, in recognite_file
return self.recognite(wav_data=str_data,
File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\asrt_sdk\speech_recognizer.py", line 108, in recognite
response_object = requests.post(self.url + self.sub_path + '/all',
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))`

@nl8590687
Copy link
Owner

您好,我按照了要求setup了服务器和pythonSDK 但是还是出了下面的错误 `Traceback (most recent call last): File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 440, in send resp = conn.urlopen( File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen retries = retries.increment( File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\client_example.py", line 34, in result = speech_recognizer.recognite_file(FILENAME) File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\asrt_sdk\speech_recognizer.py", line 153, in recognite_file return self.recognite(wav_data=str_data, File "C:\Users\yunha\Desktop\ASRT_SDK_Python3-1.1.1\asrt_sdk\speech_recognizer.py", line 108, in recognite response_object = requests.post(self.url + self.sub_path + '/all', File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 117, in post return request('post', url, data=data, json=json, **kwargs) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 529, in request resp = self.send(prep, **send_kwargs) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "C:\Users\yunha\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))`

@ryanbest
看ASRT项目文档中的FAQ常见问题说明
https://wiki.ailemon.net/docs/asrt-doc/asrt-doc-1deoeud494h4f#d1c82n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants