小梁老师 发表于 2022-6-22 18:12:17

厉害,学习了{:5_116:}

DFH1yWH3rSv 发表于 2023-10-28 13:10:06

错误提示:Exception in Tkinter callback Traceback (most recent call last):   File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 175, in _new_conn   (self._dns_host, self.port), self.timeout, **extra_kw   File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 72, in create_connection   for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):   File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo   for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: Temporary failure in name resolutionDuring handling of the above exception, another exception occurred:Traceback (most recent call last):   File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 710, in urlopen   chunked=chunked,   File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 386, in _make_request   self._validate_conn(conn)   File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 1040, in _validate_conn   conn.connect()   File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 358, in connect   conn = self._new_conn()   File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 187, in _new_conn   self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f921d1080>: Failed to establish a new connection: Temporary failure in name resolutionDuring handling of the above exception, another exception occurred:Traceback (most recent call last):   File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 450, in send   timeout=timeout   File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 786, in urlopen   method, url, error=e, _pool=self, _stacktrace=sys.exc_info()   File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 592, in increment   raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id=nsog0FXfPV8SI7fO4rajQdyN&client_secret=CSWcIau1IzrTIfOuxXerFzuiG5jclc0M (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f921d1080>: Failed to establish a new connection: Temporary failure in name resolution'))During handling of the above exception, another exception occurred:Traceback (most recent call last):   File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__   return self.func(*args)   File "/root/ctuy/cut.py", line 14, in <lambda>   gui.add_button(text="按钮",origin='center',onclick=lambda:Record(),x=120,y=110,w=100,h=30)   File "/root/ctuy/cut.py", line 42, in Record   msg = voiceToText()   File "/root/ctuy/cut.py", line 33, in voiceToText   'dev_pid': 1537,   File "/usr/local/lib/python3.7/dist-packages/aip/speech.py", line 78, in asr   return self._request(self.__asrUrl, data)   File "/usr/local/lib/python3.7/dist-packages/aip/base.py", line 89, in _request   authObj = self._auth()   File "/usr/local/lib/python3.7/dist-packages/aip/base.py", line 168, in _auth   ), proxies=self._proxies).json()   File "/usr/local/lib/python3.7/dist-packages/requests/api.py", line 75, in get   return request('get', url, params=params, **kwargs)   File "/usr/local/lib/python3.7/dist-packages/requests/api.py", line 61, in request   return session.request(method=method, url=url, **kwargs)   File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 529, in request   resp = self.send(prep, **send_kwargs)   File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 645, in send   r = adapter.send(request, **kwargs)   File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 519, in send   raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id=nsog0FXfPV8SI7fO4rajQdyN&client_secret=CSWcIau1IzrTIfOuxXerFzuiG5jclc0M (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f921d1080>: Failed to establish a new connection: Temporary failure in name resolution'))怎么办,求大佬

米饭二两 发表于 2023-12-29 22:17:16

   
>>> /Users/xiaoling/Documents/mindplus-py/environment/Python3.8.5-64/lib/python3.8/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
File "/Users/xiaoling/Documents/mindplus-py/user/2023-12-29-21-11-20/baidu-ai.py", line 1, in <module>
    from unihiker import GUI,Audio#导入包
File "/Users/xiaoling/Documents/mindplus-py/environment/Python3.8.5-64/lib/python3.8/site-packages/unihiker/__init__.py", line 2, in <module>
    from unihiker.Audio import Audio
File "/Users/xiaoling/Documents/mindplus-py/environment/Python3.8.5-64/lib/python3.8/site-packages/unihiker/Audio.py", line 22, in <module>
    c_error_handler = ERROR_HANDLER_FUNC(py_error_handler)
MemoryError

运行的时候提示这个,跑不起来,请问啥原因
页: 1 [2]
查看完整版本: 【行空板教程】语音识别助手