文章主题:AI绘图工具, UI设计, UX设计, 设计流程加速

666AI工具大全,助力做AI时代先行者!

Midjourney直接生成UI界面!AI设计体验指南

<!doctype html> <html lang=en> <head> <title>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) // Werkzeug Debugger</title> <link rel=”stylesheet” href=”?__debugger__=yes&amp;cmd=resource&amp;f=style.css”> <link rel=”shortcut icon” href=”?__debugger__=yes&amp;cmd=resource&amp;f=console.png”> <script src=”?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js”></script> <script> var CONSOLE_MODE = false, EVALEX = true, EVALEX_TRUSTED = false, SECRET = “uImqR9BO9WQOrgY4YnuS”; </script> </head> <body style=”background-color: #fff”> <div class=”debugger”> <h1>ConnectionError</h1> <div class=”detail”> <p class=”errormsg”>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </p> </div> <h2 class=”traceback”>Traceback <em>(most recent call last)</em></h2> <div class=”traceback”> <h3></h3> <ul><li><div class=”frame” id=”frame-2551877910704″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>203</em>, in <code class=”function”>_new_conn</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;Establish a socket connection and set nodelay settings on it.</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>:return: New socket connection.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>sock = connection.create_connection(</pre> <pre class=”line after”><span class=”ws”> </span>(self._dns_host, self.port),</pre> <pre class=”line after”><span class=”ws”> </span>self.timeout,</pre> <pre class=”line after”><span class=”ws”> </span>source_address=self.source_address,</pre> <pre class=”line after”><span class=”ws”> </span>socket_options=self.socket_options,</pre> <pre class=”line after”><span class=”ws”> </span>)</pre></div> </div> <li><div class=”frame” id=”frame-2551877910816″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”</cite>, line <em class=”line”>85</em>, in <code class=”function”>create_connection</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>if sock is not None:</pre> <pre class=”line before”><span class=”ws”> </span>sock.close()</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if err is not None:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>raise err</pre> <pre class=”line after”><span class=”ws”> </span>finally:</pre> <pre class=”line after”><span class=”ws”> </span># Break explicitly a reference cycle</pre> <pre class=”line after”><span class=”ws”> </span>err = None</pre> <pre class=”line after”><span class=”ws”> </span>else:</pre> <pre class=”line after”><span class=”ws”> </span>raise OSError(&#34;getaddrinfo returns an empty list&#34;)</pre></div> </div> <li><div class=”frame” id=”frame-2551877910928″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>create_connection</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if timeout is not _DEFAULT_TIMEOUT:</pre> <pre class=”line before”><span class=”ws”> </span>sock.settimeout(timeout)</pre> <pre class=”line before”><span class=”ws”> </span>if source_address:</pre> <pre class=”line before”><span class=”ws”> </span>sock.bind(source_address)</pre> <pre class=”line current”><span class=”ws”> </span>sock.connect(sa)</pre> <pre class=”line after”><span class=”ws”> </span># Break explicitly a reference cycle</pre> <pre class=”line after”><span class=”ws”> </span>err = None</pre> <pre class=”line after”><span class=”ws”> </span>return sock</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except OSError as _:</pre></div> </div> <li><div class=”exc-divider”>The above exception was the direct cause of the following exception:</div> <li><div class=”frame” id=”frame-2551877872656″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>790</em>, in <code class=”function”>urlopen</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span># it will also try to release it and we&#39;ll have a double-release</pre> <pre class=”line before”><span class=”ws”> </span># mess.</pre> <pre class=”line before”><span class=”ws”> </span>response_conn = conn if not release_conn else None</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Make the request on the HTTPConnection object</pre> <pre class=”line current”><span class=”ws”> </span>response = self._make_request(</pre> <pre class=”line after”><span class=”ws”> </span>conn,</pre> <pre class=”line after”><span class=”ws”> </span>method,</pre> <pre class=”line after”><span class=”ws”> </span>url,</pre> <pre class=”line after”><span class=”ws”> </span>timeout=timeout_obj,</pre> <pre class=”line after”><span class=”ws”> </span>body=body,</pre></div> </div> <li><div class=”frame” id=”frame-2551877872768″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>496</em>, in <code class=”function”>_make_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>raise new_e</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># conn.request() calls http.client.*.request, not the method in</pre> <pre class=”line before”><span class=”ws”> </span># urllib3.request. It also calls makefile (recv) on the socket.</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>conn.request(</pre> <pre class=”line after”><span class=”ws”> </span>method,</pre> <pre class=”line after”><span class=”ws”> </span>url,</pre> <pre class=”line after”><span class=”ws”> </span>body=body,</pre> <pre class=”line after”><span class=”ws”> </span>headers=headers,</pre> <pre class=”line after”><span class=”ws”> </span>chunked=chunked,</pre></div> </div> <li><div class=”frame” id=”frame-2551877872880″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>395</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span># Now that framing headers are out of the way we send all the other headers.</pre> <pre class=”line before”><span class=”ws”> </span>if &#34;user-agent&#34; not in header_keys:</pre> <pre class=”line before”><span class=”ws”> </span>self.putheader(&#34;User-Agent&#34;, _get_default_user_agent())</pre> <pre class=”line before”><span class=”ws”> </span>for header, value in headers.items():</pre> <pre class=”line before”><span class=”ws”> </span>self.putheader(header, value)</pre> <pre class=”line current”><span class=”ws”> </span>self.endheaders()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># If we&#39;re given a body we start sending that in chunks.</pre> <pre class=”line after”><span class=”ws”> </span>if chunks is not None:</pre> <pre class=”line after”><span class=”ws”> </span>for chunk in chunks:</pre> <pre class=”line after”><span class=”ws”> </span># Sending empty chunks isn&#39;t allowed for TE: chunked</pre></div> </div> <li><div class=”frame” id=”frame-2551877872992″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>1280</em>, in <code class=”function”>endheaders</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>if self.__state == _CS_REQ_STARTED:</pre> <pre class=”line before”><span class=”ws”> </span>self.__state = _CS_REQ_SENT</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>raise CannotSendHeader()</pre> <pre class=”line current”><span class=”ws”> </span>self._send_output(message_body, encode_chunked=encode_chunked)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def request(self, method, url, body=None, headers={}, *,</pre> <pre class=”line after”><span class=”ws”> </span>encode_chunked=False):</pre> <pre class=”line after”><span class=”ws”> </span>&#34;&#34;&#34;Send a complete request to the server.&#34;&#34;&#34;</pre> <pre class=”line after”><span class=”ws”> </span>self._send_request(method, url, body, headers, encode_chunked)</pre></div> </div> <li><div class=”frame” id=”frame-2551877873216″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>1040</em>, in <code class=”function”>_send_output</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>A message_body may be specified, to be appended to the request.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>self._buffer.extend((b&#34;&#34;, b&#34;&#34;))</pre> <pre class=”line before”><span class=”ws”> </span>msg = b&#34;\r\n&#34;.join(self._buffer)</pre> <pre class=”line before”><span class=”ws”> </span>del self._buffer[:]</pre> <pre class=”line current”><span class=”ws”> </span>self.send(msg)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>if message_body is not None:</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># create a consistent interface to message_body</pre> <pre class=”line after”><span class=”ws”> </span>if hasattr(message_body, &#39;read&#39;):</pre></div> </div> <li><div class=”frame” id=”frame-2551877873328″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>980</em>, in <code class=”function”>send</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>file-like object that supports a .read() method, or an iterable object.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if self.sock is None:</pre> <pre class=”line before”><span class=”ws”> </span>if self.auto_open:</pre> <pre class=”line current”><span class=”ws”> </span>self.connect()</pre> <pre class=”line after”><span class=”ws”> </span>else:</pre> <pre class=”line after”><span class=”ws”> </span>raise NotConnected()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>if self.debuglevel &gt; 0:</pre> <pre class=”line after”><span class=”ws”> </span>print(&#34;send:&#34;, repr(data))</pre></div> </div> <li><div class=”frame” id=”frame-2551877873440″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>243</em>, in <code class=”function”>connect</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>)</pre> <pre class=”line before”><span class=”ws”> </span>super().set_tunnel(host, port=port, headers=headers)</pre> <pre class=”line before”><span class=”ws”> </span>self._tunnel_scheme = scheme</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>def connect(self) -&gt; None:</pre> <pre class=”line current”><span class=”ws”> </span>self.sock = self._new_conn()</pre> <pre class=”line after”><span class=”ws”> </span>if self._tunnel_host:</pre> <pre class=”line after”><span class=”ws”> </span># If we&#39;re tunneling it means we&#39;re connected to our proxy.</pre> <pre class=”line after”><span class=”ws”> </span>self._has_connected_to_proxy = True</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># TODO: Fix tunnel so it doesn&#39;t depend on self.sock state.</pre></div> </div> <li><div class=”frame” id=”frame-2551877873552″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>218</em>, in <code class=”function”>_new_conn</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>self,</pre> <pre class=”line before”><span class=”ws”> </span>f&#34;Connection to {self.host} timed out. (connect timeout={self.timeout})&#34;,</pre> <pre class=”line before”><span class=”ws”> </span>) from e</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>except OSError as e:</pre> <pre class=”line current”><span class=”ws”> </span>raise NewConnectionError(</pre> <pre class=”line after”><span class=”ws”> </span>self, f&#34;Failed to establish a new connection: {e}&#34;</pre> <pre class=”line after”><span class=”ws”> </span>) from e</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Audit hooks are only available in Python 3.8+</pre> <pre class=”line after”><span class=”ws”> </span>if _HAS_SYS_AUDIT:</pre></div> </div> <li><div class=”exc-divider”>The above exception was the direct cause of the following exception:</div> <li><div class=”frame” id=”frame-2551877872208″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”</cite>, line <em class=”line”>486</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>pass</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>timeout = TimeoutSauce(connect=timeout, read=timeout)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>resp = conn.urlopen(</pre> <pre class=”line after”><span class=”ws”> </span>method=request.method,</pre> <pre class=”line after”><span class=”ws”> </span>url=url,</pre> <pre class=”line after”><span class=”ws”> </span>body=request.body,</pre> <pre class=”line after”><span class=”ws”> </span>headers=request.headers,</pre> <pre class=”line after”><span class=”ws”> </span>redirect=False,</pre></div> </div> <li><div class=”frame” id=”frame-2551877872320″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>844</em>, in <code class=”function”>urlopen</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>) and (conn and conn.proxy and not conn.has_connected_to_proxy):</pre> <pre class=”line before”><span class=”ws”> </span>new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)</pre> <pre class=”line before”><span class=”ws”> </span>elif isinstance(new_e, (OSError, HTTPException)):</pre> <pre class=”line before”><span class=”ws”> </span>new_e = ProtocolError(&#34;Connection aborted.&#34;, new_e)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line current”><span class=”ws”> </span>retries = retries.increment(</pre> <pre class=”line after”><span class=”ws”> </span>method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]</pre> <pre class=”line after”><span class=”ws”> </span>)</pre> <pre class=”line after”><span class=”ws”> </span>retries.sleep()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Keep track of the error for the retry warning.</pre></div> </div> <li><div class=”frame” id=”frame-2551877872432″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py”</cite>, line <em class=”line”>515</em>, in <code class=”function”>increment</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>history=history,</pre> <pre class=”line before”><span class=”ws”> </span>)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if new_retry.is_exhausted():</pre> <pre class=”line before”><span class=”ws”> </span>reason = error or ResponseError(cause)</pre> <pre class=”line current”><span class=”ws”> </span>raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>log.debug(&#34;Incremented Retry for (url=&#39;%s&#39;): %r&#34;, url, new_retry)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return new_retry</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”exc-divider”>During handling of the above exception, another exception occurred:</div> <li><div class=”frame” id=”frame-2551877869856″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1478</em>, in <code class=”function”>__call__</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>def __call__(self, environ: dict, start_response: t.Callable) -&gt; t.Any:</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;The WSGI server calls the Flask application object as the</pre> <pre class=”line before”><span class=”ws”> </span>WSGI application. This calls :meth:`wsgi_app`, which can be</pre> <pre class=”line before”><span class=”ws”> </span>wrapped to apply middleware.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line current”><span class=”ws”> </span>return self.wsgi_app(environ, start_response)</pre></div> </div> <li><div class=”frame” id=”frame-2551877870080″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1458</em>, in <code class=”function”>wsgi_app</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>ctx.push()</pre> <pre class=”line before”><span class=”ws”> </span>response = self.full_dispatch_request()</pre> <pre class=”line before”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line before”><span class=”ws”> </span>error = e</pre> <pre class=”line current”><span class=”ws”> </span>response = self.handle_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>except: # noqa: B001</pre> <pre class=”line after”><span class=”ws”> </span>error = sys.exc_info()[1]</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”> </span>return response(environ, start_response)</pre> <pre class=”line after”><span class=”ws”> </span>finally:</pre></div> </div> <li><div class=”frame” id=”frame-2551877869968″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1455</em>, in <code class=”function”>wsgi_app</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>ctx = self.request_context(environ)</pre> <pre class=”line before”><span class=”ws”> </span>error: BaseException | None = None</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>ctx.push()</pre> <pre class=”line current”><span class=”ws”> </span>response = self.full_dispatch_request()</pre> <pre class=”line after”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line after”><span class=”ws”> </span>error = e</pre> <pre class=”line after”><span class=”ws”> </span>response = self.handle_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>except: # noqa: B001</pre> <pre class=”line after”><span class=”ws”> </span>error = sys.exc_info()[1]</pre></div> </div> <li><div class=”frame” id=”frame-2551877870192″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>869</em>, in <code class=”function”>full_dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.preprocess_request()</pre> <pre class=”line before”><span class=”ws”> </span>if rv is None:</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.dispatch_request()</pre> <pre class=”line before”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line current”><span class=”ws”> </span>rv = self.handle_user_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>return self.finalize_request(rv)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def finalize_request(</pre> <pre class=”line after”><span class=”ws”> </span>self,</pre> <pre class=”line after”><span class=”ws”> </span>rv: ft.ResponseReturnValue | HTTPException,</pre></div> </div> <li><div class=”frame” id=”frame-2551877870304″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>867</em>, in <code class=”function”>full_dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.preprocess_request()</pre> <pre class=”line before”><span class=”ws”> </span>if rv is None:</pre> <pre class=”line current”><span class=”ws”> </span>rv = self.dispatch_request()</pre> <pre class=”line after”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line after”><span class=”ws”> </span>rv = self.handle_user_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>return self.finalize_request(rv)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def finalize_request(</pre></div> </div> <li><div class=”frame” id=”frame-2551877870416″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>852</em>, in <code class=”function”>dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>and req.method == &#34;OPTIONS&#34;</pre> <pre class=”line before”><span class=”ws”> </span>):</pre> <pre class=”line before”><span class=”ws”> </span>return self.make_default_options_response()</pre> <pre class=”line before”><span class=”ws”> </span># otherwise dispatch to the handler for that endpoint</pre> <pre class=”line before”><span class=”ws”> </span>view_args: dict[str, t.Any] = req.view_args # type: ignore[assignment]</pre> <pre class=”line current”><span class=”ws”> </span>return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def full_dispatch_request(self) -&gt; Response:</pre> <pre class=”line after”><span class=”ws”> </span>&#34;&#34;&#34;Dispatches the request and on top of that performs request</pre> <pre class=”line after”><span class=”ws”> </span>pre and postprocessing as well as HTTP exception catching and</pre> <pre class=”line after”><span class=”ws”> </span>error handling.</pre></div> </div> <li><div class=”frame” id=”frame-2551877870528″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>322</em>, in <code class=”function”>get_new_content_api</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”></span>def get_new_content_api():</pre> <pre class=”line before”><span class=”ws”> </span>content = request.args.get(&#39;content&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>engine_type = request.args.get(&#39;engine_type&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>need_summary = request.args.get(&#39;need_summary&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>need_keywords = request.args.get(&#39;need_keywords&#39;)</pre> <pre class=”line current”><span class=”ws”> </span>new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度</pre> <pre class=”line after”><span class=”ws”> </span>return new_content</pre> <pre class=”line after”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line after”><span class=”ws”></span>def get_new_content(engine_type,need_summary,need_keywords,init_content):</pre> <pre class=”line after”><span class=”ws”> </span>if engine_type == RewriteEnum.EngineType.WENXINYIYAN:</pre> <pre class=”line after”><span class=”ws”> </span>new_content = get_wp_post_wx_continue(need_summary,need_keywords ,init_content)</pre></div> </div> <li><div class=”frame” id=”frame-2551877870640″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\decorator.py”</cite>, line <em class=”line”>232</em>, in <code class=”function”>fun</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>yield res</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>def fun(*args, **kw):</pre> <pre class=”line before”><span class=”ws”> </span>if not kwsyntax:</pre> <pre class=”line before”><span class=”ws”> </span>args, kw = fix(args, kw, sig)</pre> <pre class=”line current”><span class=”ws”> </span>return caller(func, *(extras + args), **kw)</pre> <pre class=”line after”><span class=”ws”> </span>fun.__name__ = func.__name__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__doc__ = func.__doc__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__wrapped__ = func</pre> <pre class=”line after”><span class=”ws”> </span>fun.__signature__ = sig</pre> <pre class=”line after”><span class=”ws”> </span>fun.__qualname__ = func.__qualname__</pre></div> </div> <li><div class=”frame” id=”frame-2551877870752″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>retry_decorator</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>@decorator</pre> <pre class=”line before”><span class=”ws”> </span>def retry_decorator(f, *fargs, **fkwargs):</pre> <pre class=”line before”><span class=”ws”> </span>args = fargs if fargs else list()</pre> <pre class=”line before”><span class=”ws”> </span>kwargs = fkwargs if fkwargs else dict()</pre> <pre class=”line current”><span class=”ws”> </span>return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,</pre> <pre class=”line after”><span class=”ws”> </span>logger)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return retry_decorator</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877870864″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>33</em>, in <code class=”function”>__retry_internal</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>:returns: the result of the f function.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>_tries, _delay = tries, delay</pre> <pre class=”line before”><span class=”ws”> </span>while _tries:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>return f()</pre> <pre class=”line after”><span class=”ws”> </span>except exceptions as e:</pre> <pre class=”line after”><span class=”ws”> </span>_tries -= 1</pre> <pre class=”line after”><span class=”ws”> </span>if not _tries:</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877870976″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>329</em>, in <code class=”function”>get_new_content</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line before”><span class=”ws”></span>def get_new_content(engine_type,need_summary,need_keywords,init_content):</pre> <pre class=”line before”><span class=”ws”> </span>if engine_type == RewriteEnum.EngineType.WENXINYIYAN:</pre> <pre class=”line before”><span class=”ws”> </span>new_content = get_wp_post_wx_continue(need_summary,need_keywords ,init_content)</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line current”><span class=”ws”> </span>new_content = get_new_content_chatglm(init_content)</pre> <pre class=”line after”><span class=”ws”> </span>return new_content</pre> <pre class=”line after”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line after”><span class=”ws”></span>def get_new_content_chatglm(content):</pre> <pre class=”line after”><span class=”ws”> </span>payload = {</pre> <pre class=”line after”><span class=”ws”> </span>&#34;model&#34;: &#34;chatglm3-6b&#34;,</pre></div> </div> <li><div class=”frame” id=”frame-2551877871200″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\decorator.py”</cite>, line <em class=”line”>232</em>, in <code class=”function”>fun</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>yield res</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>def fun(*args, **kw):</pre> <pre class=”line before”><span class=”ws”> </span>if not kwsyntax:</pre> <pre class=”line before”><span class=”ws”> </span>args, kw = fix(args, kw, sig)</pre> <pre class=”line current”><span class=”ws”> </span>return caller(func, *(extras + args), **kw)</pre> <pre class=”line after”><span class=”ws”> </span>fun.__name__ = func.__name__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__doc__ = func.__doc__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__wrapped__ = func</pre> <pre class=”line after”><span class=”ws”> </span>fun.__signature__ = sig</pre> <pre class=”line after”><span class=”ws”> </span>fun.__qualname__ = func.__qualname__</pre></div> </div> <li><div class=”frame” id=”frame-2551877871312″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>retry_decorator</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>@decorator</pre> <pre class=”line before”><span class=”ws”> </span>def retry_decorator(f, *fargs, **fkwargs):</pre> <pre class=”line before”><span class=”ws”> </span>args = fargs if fargs else list()</pre> <pre class=”line before”><span class=”ws”> </span>kwargs = fkwargs if fkwargs else dict()</pre> <pre class=”line current”><span class=”ws”> </span>return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,</pre> <pre class=”line after”><span class=”ws”> </span>logger)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return retry_decorator</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877871424″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>33</em>, in <code class=”function”>__retry_internal</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>:returns: the result of the f function.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>_tries, _delay = tries, delay</pre> <pre class=”line before”><span class=”ws”> </span>while _tries:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>return f()</pre> <pre class=”line after”><span class=”ws”> </span>except exceptions as e:</pre> <pre class=”line after”><span class=”ws”> </span>_tries -= 1</pre> <pre class=”line after”><span class=”ws”> </span>if not _tries:</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877871536″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>355</em>, in <code class=”function”>get_new_content_chatglm</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>&#34;functions&#34;: {},</pre> <pre class=”line before”><span class=”ws”> </span>&#34;repetition_penalty&#34;: 1.1</pre> <pre class=”line before”><span class=”ws”> </span>}</pre> <pre class=”line before”><span class=”ws”> </span>headers = {&#34;content-type&#34;: &#34;application/json&#34;}</pre> <pre class=”line before”><span class=”ws”> </span>task_start_time = time.time()</pre> <pre class=”line current”><span class=”ws”> </span>response = requests.request(&#34;POST&#34;, chatglm_url, json=payload, headers=headers)</pre> <pre class=”line after”><span class=”ws”> </span>#print(response)</pre> <pre class=”line after”><span class=”ws”> </span>data = response.json()</pre> <pre class=”line after”><span class=”ws”> </span>print(json.dumps(data, indent=4))</pre> <pre class=”line after”><span class=”ws”> </span>new_content = data[&#39;choices&#39;][0][&#39;message&#39;][&#39;content&#39;]</pre> <pre class=”line after”><span class=”ws”> </span>new_content = new_content.replace(&#34;重新改写后:&#34;, &#34;&#34;).replace(&#34;&#34;, &#34;&#34;)</pre></div> </div> <li><div class=”frame” id=”frame-2551877871648″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\api.py”</cite>, line <em class=”line”>59</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># By using the &#39;with&#39; statement we are sure the session is closed, thus we</pre> <pre class=”line before”><span class=”ws”> </span># avoid leaving sockets open which can trigger a ResourceWarning in some</pre> <pre class=”line before”><span class=”ws”> </span># cases, and look like a memory leak in others.</pre> <pre class=”line before”><span class=”ws”> </span>with sessions.Session() as session:</pre> <pre class=”line current”><span class=”ws”> </span>return session.request(method=method, url=url, **kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span>def get(url, params=None, **kwargs):</pre> <pre class=”line after”><span class=”ws”> </span>r&#34;&#34;&#34;Sends a GET request.</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877871872″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”</cite>, line <em class=”line”>589</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>send_kwargs = {</pre> <pre class=”line before”><span class=”ws”> </span>&#34;timeout&#34;: timeout,</pre> <pre class=”line before”><span class=”ws”> </span>&#34;allow_redirects&#34;: allow_redirects,</pre> <pre class=”line before”><span class=”ws”> </span>}</pre> <pre class=”line before”><span class=”ws”> </span>send_kwargs.update(settings)</pre> <pre class=”line current”><span class=”ws”> </span>resp = self.send(prep, **send_kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return resp</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def get(self, url, **kwargs):</pre> <pre class=”line after”><span class=”ws”> </span>r&#34;&#34;&#34;Sends a GET request. Returns :class:`Response` object.</pre></div> </div> <li><div class=”frame” id=”frame-2551877871984″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”</cite>, line <em class=”line”>703</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Start time (approximately) of the request</pre> <pre class=”line before”><span class=”ws”> </span>start = preferred_clock()</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Send the request</pre> <pre class=”line current”><span class=”ws”> </span>r = adapter.send(request, **kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Total elapsed time of the request (approximately)</pre> <pre class=”line after”><span class=”ws”> </span>elapsed = preferred_clock() – start</pre> <pre class=”line after”><span class=”ws”> </span>r.elapsed = timedelta(seconds=elapsed)</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877872096″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”</cite>, line <em class=”line”>519</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if isinstance(e.reason, _SSLError):</pre> <pre class=”line before”><span class=”ws”> </span># This branch is for urllib3 v1.22 and later.</pre> <pre class=”line before”><span class=”ws”> </span>raise SSLError(e, request=request)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line current”><span class=”ws”> </span>raise ConnectionError(e, request=request)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except ClosedPoolError as e:</pre> <pre class=”line after”><span class=”ws”> </span>raise ConnectionError(e, request=request)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except _ProxyError as e:</pre></div> </div> </ul> <blockquote>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </blockquote> </div> <div class=”plain”> <p> This is the Copy/Paste friendly version of the traceback. </p> <textarea cols=”50″ rows=”10″ name=”code” readonly>Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 203, in _new_conn sock = connection.create_connection( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py&#34;, line 85, in create_connection raise err File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py&#34;, line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 790, in urlopen response = self._make_request( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 496, in _make_request conn.request( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 395, in request self.endheaders() File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 1040, in _send_output self.send(msg) File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 980, in send self.connect() File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 243, in connect self.sock = self._new_conn() File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py&#34;, line 486, in send resp = conn.urlopen( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 844, in urlopen retries = retries.increment( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py&#34;, line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1478, in __call__ return self.wsgi_app(environ, start_response) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1458, in wsgi_app response = self.handle_exception(e) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1455, in wsgi_app response = self.full_dispatch_request() File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 869, in full_dispatch_request rv = self.handle_user_exception(e) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 867, in full_dispatch_request rv = self.dispatch_request() File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File &#34;F:\project\wxgzh\model_server.py&#34;, line 322, in get_new_content_api new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度 File &#34;F:\project\wxgzh\venv\lib\site-packages\decorator.py&#34;, line 232, in fun return caller(func, *(extras + args), **kw) File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 33, in __retry_internal return f() File &#34;F:\project\wxgzh\model_server.py&#34;, line 329, in get_new_content new_content = get_new_content_chatglm(init_content) File &#34;F:\project\wxgzh\venv\lib\site-packages\decorator.py&#34;, line 232, in fun return caller(func, *(extras + args), **kw) File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 33, in __retry_internal return f() File &#34;F:\project\wxgzh\model_server.py&#34;, line 355, in get_new_content_chatglm response = requests.request(&#34;POST&#34;, chatglm_url, json=payload, headers=headers) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\api.py&#34;, line 59, in request return session.request(method=method, url=url, **kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py&#34;, line 589, in request resp = self.send(prep, **send_kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py&#34;, line 703, in send r = adapter.send(request, **kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py&#34;, line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C65340&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </textarea> </div> <div class=”explanation”> The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. <span class=”nojavascript”> If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.</span> </div> <div class=”footer”> Brought to you by <strong class=”arthur”>DON’T PANIC</strong>, your friendly Werkzeug powered traceback interpreter. </div> </div> <div class=”pin-prompt”> <div class=”inner”> <h3>Console Locked</h3> <p> The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server. <form> <p>PIN: <input type=text name=pin size=14> <input type=submit name=btn value=”Confirm Pin”> </form> </div> </div> </body> </html> <!– Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 203, in _new_conn sock = connection.create_connection( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”, line 85, in create_connection raise err File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”, line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 790, in urlopen response = self._make_request( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 496, in _make_request conn.request( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 395, in request self.endheaders() File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 1040, in _send_output self.send(msg) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 980, in send self.connect() File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 243, in connect self.sock = self._new_conn() File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000025227C65340>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”, line 486, in send resp = conn.urlopen( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 844, in urlopen retries = retries.increment( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py”, line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=’127.0.0.1′, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x0000025227C65340>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1478, in __call__ return self.wsgi_app(environ, start_response) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1458, in wsgi_app response = self.handle_exception(e) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1455, in wsgi_app response = self.full_dispatch_request() File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 869, in full_dispatch_request rv = self.handle_user_exception(e) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 867, in full_dispatch_request rv = self.dispatch_request() File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File “F:\project\wxgzh\model_server.py”, line 322, in get_new_content_api new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度 File “F:\project\wxgzh\venv\lib\site-packages\decorator.py”, line 232, in fun return caller(func, *(extras + args), **kw) File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 33, in __retry_internal return f() File “F:\project\wxgzh\model_server.py”, line 329, in get_new_content new_content = get_new_content_chatglm(init_content) File “F:\project\wxgzh\venv\lib\site-packages\decorator.py”, line 232, in fun return caller(func, *(extras + args), **kw) File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 33, in __retry_internal return f() File “F:\project\wxgzh\model_server.py”, line 355, in get_new_content_chatglm response = requests.request(“POST”, chatglm_url, json=payload, headers=headers) File “F:\project\wxgzh\venv\lib\site-packages\requests\api.py”, line 59, in request return session.request(method=method, url=url, **kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”, line 589, in request resp = self.send(prep, **send_kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”, line 703, in send r = adapter.send(request, **kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”, line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host=’127.0.0.1′, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x0000025227C65340>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’)) –>

<!doctype html> <html lang=en> <head> <title>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) // Werkzeug Debugger</title> <link rel=”stylesheet” href=”?__debugger__=yes&amp;cmd=resource&amp;f=style.css”> <link rel=”shortcut icon” href=”?__debugger__=yes&amp;cmd=resource&amp;f=console.png”> <script src=”?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js”></script> <script> var CONSOLE_MODE = false, EVALEX = true, EVALEX_TRUSTED = false, SECRET = “uImqR9BO9WQOrgY4YnuS”; </script> </head> <body style=”background-color: #fff”> <div class=”debugger”> <h1>ConnectionError</h1> <div class=”detail”> <p class=”errormsg”>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </p> </div> <h2 class=”traceback”>Traceback <em>(most recent call last)</em></h2> <div class=”traceback”> <h3></h3> <ul><li><div class=”frame” id=”frame-2551878046320″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>203</em>, in <code class=”function”>_new_conn</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;Establish a socket connection and set nodelay settings on it.</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>:return: New socket connection.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>sock = connection.create_connection(</pre> <pre class=”line after”><span class=”ws”> </span>(self._dns_host, self.port),</pre> <pre class=”line after”><span class=”ws”> </span>self.timeout,</pre> <pre class=”line after”><span class=”ws”> </span>source_address=self.source_address,</pre> <pre class=”line after”><span class=”ws”> </span>socket_options=self.socket_options,</pre> <pre class=”line after”><span class=”ws”> </span>)</pre></div> </div> <li><div class=”frame” id=”frame-2551878046432″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”</cite>, line <em class=”line”>85</em>, in <code class=”function”>create_connection</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>if sock is not None:</pre> <pre class=”line before”><span class=”ws”> </span>sock.close()</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if err is not None:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>raise err</pre> <pre class=”line after”><span class=”ws”> </span>finally:</pre> <pre class=”line after”><span class=”ws”> </span># Break explicitly a reference cycle</pre> <pre class=”line after”><span class=”ws”> </span>err = None</pre> <pre class=”line after”><span class=”ws”> </span>else:</pre> <pre class=”line after”><span class=”ws”> </span>raise OSError(&#34;getaddrinfo returns an empty list&#34;)</pre></div> </div> <li><div class=”frame” id=”frame-2551878046544″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>create_connection</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if timeout is not _DEFAULT_TIMEOUT:</pre> <pre class=”line before”><span class=”ws”> </span>sock.settimeout(timeout)</pre> <pre class=”line before”><span class=”ws”> </span>if source_address:</pre> <pre class=”line before”><span class=”ws”> </span>sock.bind(source_address)</pre> <pre class=”line current”><span class=”ws”> </span>sock.connect(sa)</pre> <pre class=”line after”><span class=”ws”> </span># Break explicitly a reference cycle</pre> <pre class=”line after”><span class=”ws”> </span>err = None</pre> <pre class=”line after”><span class=”ws”> </span>return sock</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except OSError as _:</pre></div> </div> <li><div class=”exc-divider”>The above exception was the direct cause of the following exception:</div> <li><div class=”frame” id=”frame-2551877975504″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>790</em>, in <code class=”function”>urlopen</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span># it will also try to release it and we&#39;ll have a double-release</pre> <pre class=”line before”><span class=”ws”> </span># mess.</pre> <pre class=”line before”><span class=”ws”> </span>response_conn = conn if not release_conn else None</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Make the request on the HTTPConnection object</pre> <pre class=”line current”><span class=”ws”> </span>response = self._make_request(</pre> <pre class=”line after”><span class=”ws”> </span>conn,</pre> <pre class=”line after”><span class=”ws”> </span>method,</pre> <pre class=”line after”><span class=”ws”> </span>url,</pre> <pre class=”line after”><span class=”ws”> </span>timeout=timeout_obj,</pre> <pre class=”line after”><span class=”ws”> </span>body=body,</pre></div> </div> <li><div class=”frame” id=”frame-2551877975616″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>496</em>, in <code class=”function”>_make_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>raise new_e</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># conn.request() calls http.client.*.request, not the method in</pre> <pre class=”line before”><span class=”ws”> </span># urllib3.request. It also calls makefile (recv) on the socket.</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>conn.request(</pre> <pre class=”line after”><span class=”ws”> </span>method,</pre> <pre class=”line after”><span class=”ws”> </span>url,</pre> <pre class=”line after”><span class=”ws”> </span>body=body,</pre> <pre class=”line after”><span class=”ws”> </span>headers=headers,</pre> <pre class=”line after”><span class=”ws”> </span>chunked=chunked,</pre></div> </div> <li><div class=”frame” id=”frame-2551877975728″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>395</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span># Now that framing headers are out of the way we send all the other headers.</pre> <pre class=”line before”><span class=”ws”> </span>if &#34;user-agent&#34; not in header_keys:</pre> <pre class=”line before”><span class=”ws”> </span>self.putheader(&#34;User-Agent&#34;, _get_default_user_agent())</pre> <pre class=”line before”><span class=”ws”> </span>for header, value in headers.items():</pre> <pre class=”line before”><span class=”ws”> </span>self.putheader(header, value)</pre> <pre class=”line current”><span class=”ws”> </span>self.endheaders()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># If we&#39;re given a body we start sending that in chunks.</pre> <pre class=”line after”><span class=”ws”> </span>if chunks is not None:</pre> <pre class=”line after”><span class=”ws”> </span>for chunk in chunks:</pre> <pre class=”line after”><span class=”ws”> </span># Sending empty chunks isn&#39;t allowed for TE: chunked</pre></div> </div> <li><div class=”frame” id=”frame-2551877975840″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>1280</em>, in <code class=”function”>endheaders</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>if self.__state == _CS_REQ_STARTED:</pre> <pre class=”line before”><span class=”ws”> </span>self.__state = _CS_REQ_SENT</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>raise CannotSendHeader()</pre> <pre class=”line current”><span class=”ws”> </span>self._send_output(message_body, encode_chunked=encode_chunked)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def request(self, method, url, body=None, headers={}, *,</pre> <pre class=”line after”><span class=”ws”> </span>encode_chunked=False):</pre> <pre class=”line after”><span class=”ws”> </span>&#34;&#34;&#34;Send a complete request to the server.&#34;&#34;&#34;</pre> <pre class=”line after”><span class=”ws”> </span>self._send_request(method, url, body, headers, encode_chunked)</pre></div> </div> <li><div class=”frame” id=”frame-2551878045760″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>1040</em>, in <code class=”function”>_send_output</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>A message_body may be specified, to be appended to the request.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>self._buffer.extend((b&#34;&#34;, b&#34;&#34;))</pre> <pre class=”line before”><span class=”ws”> </span>msg = b&#34;\r\n&#34;.join(self._buffer)</pre> <pre class=”line before”><span class=”ws”> </span>del self._buffer[:]</pre> <pre class=”line current”><span class=”ws”> </span>self.send(msg)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>if message_body is not None:</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># create a consistent interface to message_body</pre> <pre class=”line after”><span class=”ws”> </span>if hasattr(message_body, &#39;read&#39;):</pre></div> </div> <li><div class=”frame” id=”frame-2551878045872″> <h4>File <cite class=”filename”>”C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”</cite>, line <em class=”line”>980</em>, in <code class=”function”>send</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>file-like object that supports a .read() method, or an iterable object.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if self.sock is None:</pre> <pre class=”line before”><span class=”ws”> </span>if self.auto_open:</pre> <pre class=”line current”><span class=”ws”> </span>self.connect()</pre> <pre class=”line after”><span class=”ws”> </span>else:</pre> <pre class=”line after”><span class=”ws”> </span>raise NotConnected()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>if self.debuglevel &gt; 0:</pre> <pre class=”line after”><span class=”ws”> </span>print(&#34;send:&#34;, repr(data))</pre></div> </div> <li><div class=”frame” id=”frame-2551878045984″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>243</em>, in <code class=”function”>connect</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>)</pre> <pre class=”line before”><span class=”ws”> </span>super().set_tunnel(host, port=port, headers=headers)</pre> <pre class=”line before”><span class=”ws”> </span>self._tunnel_scheme = scheme</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>def connect(self) -&gt; None:</pre> <pre class=”line current”><span class=”ws”> </span>self.sock = self._new_conn()</pre> <pre class=”line after”><span class=”ws”> </span>if self._tunnel_host:</pre> <pre class=”line after”><span class=”ws”> </span># If we&#39;re tunneling it means we&#39;re connected to our proxy.</pre> <pre class=”line after”><span class=”ws”> </span>self._has_connected_to_proxy = True</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># TODO: Fix tunnel so it doesn&#39;t depend on self.sock state.</pre></div> </div> <li><div class=”frame” id=”frame-2551878046096″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”</cite>, line <em class=”line”>218</em>, in <code class=”function”>_new_conn</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>self,</pre> <pre class=”line before”><span class=”ws”> </span>f&#34;Connection to {self.host} timed out. (connect timeout={self.timeout})&#34;,</pre> <pre class=”line before”><span class=”ws”> </span>) from e</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>except OSError as e:</pre> <pre class=”line current”><span class=”ws”> </span>raise NewConnectionError(</pre> <pre class=”line after”><span class=”ws”> </span>self, f&#34;Failed to establish a new connection: {e}&#34;</pre> <pre class=”line after”><span class=”ws”> </span>) from e</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Audit hooks are only available in Python 3.8+</pre> <pre class=”line after”><span class=”ws”> </span>if _HAS_SYS_AUDIT:</pre></div> </div> <li><div class=”exc-divider”>The above exception was the direct cause of the following exception:</div> <li><div class=”frame” id=”frame-2551877975056″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”</cite>, line <em class=”line”>486</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>pass</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>timeout = TimeoutSauce(connect=timeout, read=timeout)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>resp = conn.urlopen(</pre> <pre class=”line after”><span class=”ws”> </span>method=request.method,</pre> <pre class=”line after”><span class=”ws”> </span>url=url,</pre> <pre class=”line after”><span class=”ws”> </span>body=request.body,</pre> <pre class=”line after”><span class=”ws”> </span>headers=request.headers,</pre> <pre class=”line after”><span class=”ws”> </span>redirect=False,</pre></div> </div> <li><div class=”frame” id=”frame-2551877975168″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”</cite>, line <em class=”line”>844</em>, in <code class=”function”>urlopen</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>) and (conn and conn.proxy and not conn.has_connected_to_proxy):</pre> <pre class=”line before”><span class=”ws”> </span>new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)</pre> <pre class=”line before”><span class=”ws”> </span>elif isinstance(new_e, (OSError, HTTPException)):</pre> <pre class=”line before”><span class=”ws”> </span>new_e = ProtocolError(&#34;Connection aborted.&#34;, new_e)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line current”><span class=”ws”> </span>retries = retries.increment(</pre> <pre class=”line after”><span class=”ws”> </span>method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]</pre> <pre class=”line after”><span class=”ws”> </span>)</pre> <pre class=”line after”><span class=”ws”> </span>retries.sleep()</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Keep track of the error for the retry warning.</pre></div> </div> <li><div class=”frame” id=”frame-2551877975280″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py”</cite>, line <em class=”line”>515</em>, in <code class=”function”>increment</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>history=history,</pre> <pre class=”line before”><span class=”ws”> </span>)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if new_retry.is_exhausted():</pre> <pre class=”line before”><span class=”ws”> </span>reason = error or ResponseError(cause)</pre> <pre class=”line current”><span class=”ws”> </span>raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>log.debug(&#34;Incremented Retry for (url=&#39;%s&#39;): %r&#34;, url, new_retry)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return new_retry</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”exc-divider”>During handling of the above exception, another exception occurred:</div> <li><div class=”frame” id=”frame-2551877972816″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1478</em>, in <code class=”function”>__call__</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>def __call__(self, environ: dict, start_response: t.Callable) -&gt; t.Any:</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;The WSGI server calls the Flask application object as the</pre> <pre class=”line before”><span class=”ws”> </span>WSGI application. This calls :meth:`wsgi_app`, which can be</pre> <pre class=”line before”><span class=”ws”> </span>wrapped to apply middleware.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line current”><span class=”ws”> </span>return self.wsgi_app(environ, start_response)</pre></div> </div> <li><div class=”frame” id=”frame-2551877972256″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1458</em>, in <code class=”function”>wsgi_app</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>ctx.push()</pre> <pre class=”line before”><span class=”ws”> </span>response = self.full_dispatch_request()</pre> <pre class=”line before”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line before”><span class=”ws”> </span>error = e</pre> <pre class=”line current”><span class=”ws”> </span>response = self.handle_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>except: # noqa: B001</pre> <pre class=”line after”><span class=”ws”> </span>error = sys.exc_info()[1]</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”> </span>return response(environ, start_response)</pre> <pre class=”line after”><span class=”ws”> </span>finally:</pre></div> </div> <li><div class=”frame” id=”frame-2551877972704″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>1455</em>, in <code class=”function”>wsgi_app</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>ctx = self.request_context(environ)</pre> <pre class=”line before”><span class=”ws”> </span>error: BaseException | None = None</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>ctx.push()</pre> <pre class=”line current”><span class=”ws”> </span>response = self.full_dispatch_request()</pre> <pre class=”line after”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line after”><span class=”ws”> </span>error = e</pre> <pre class=”line after”><span class=”ws”> </span>response = self.handle_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>except: # noqa: B001</pre> <pre class=”line after”><span class=”ws”> </span>error = sys.exc_info()[1]</pre></div> </div> <li><div class=”frame” id=”frame-2551877973040″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>869</em>, in <code class=”function”>full_dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.preprocess_request()</pre> <pre class=”line before”><span class=”ws”> </span>if rv is None:</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.dispatch_request()</pre> <pre class=”line before”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line current”><span class=”ws”> </span>rv = self.handle_user_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>return self.finalize_request(rv)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def finalize_request(</pre> <pre class=”line after”><span class=”ws”> </span>self,</pre> <pre class=”line after”><span class=”ws”> </span>rv: ft.ResponseReturnValue | HTTPException,</pre></div> </div> <li><div class=”frame” id=”frame-2551877973152″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>867</em>, in <code class=”function”>full_dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line before”><span class=”ws”> </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre> <pre class=”line before”><span class=”ws”> </span>rv = self.preprocess_request()</pre> <pre class=”line before”><span class=”ws”> </span>if rv is None:</pre> <pre class=”line current”><span class=”ws”> </span>rv = self.dispatch_request()</pre> <pre class=”line after”><span class=”ws”> </span>except Exception as e:</pre> <pre class=”line after”><span class=”ws”> </span>rv = self.handle_user_exception(e)</pre> <pre class=”line after”><span class=”ws”> </span>return self.finalize_request(rv)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def finalize_request(</pre></div> </div> <li><div class=”frame” id=”frame-2551877973264″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\flask\app.py”</cite>, line <em class=”line”>852</em>, in <code class=”function”>dispatch_request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>and req.method == &#34;OPTIONS&#34;</pre> <pre class=”line before”><span class=”ws”> </span>):</pre> <pre class=”line before”><span class=”ws”> </span>return self.make_default_options_response()</pre> <pre class=”line before”><span class=”ws”> </span># otherwise dispatch to the handler for that endpoint</pre> <pre class=”line before”><span class=”ws”> </span>view_args: dict[str, t.Any] = req.view_args # type: ignore[assignment]</pre> <pre class=”line current”><span class=”ws”> </span>return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def full_dispatch_request(self) -&gt; Response:</pre> <pre class=”line after”><span class=”ws”> </span>&#34;&#34;&#34;Dispatches the request and on top of that performs request</pre> <pre class=”line after”><span class=”ws”> </span>pre and postprocessing as well as HTTP exception catching and</pre> <pre class=”line after”><span class=”ws”> </span>error handling.</pre></div> </div> <li><div class=”frame” id=”frame-2551877973376″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>322</em>, in <code class=”function”>get_new_content_api</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”></span>def get_new_content_api():</pre> <pre class=”line before”><span class=”ws”> </span>content = request.args.get(&#39;content&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>engine_type = request.args.get(&#39;engine_type&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>need_summary = request.args.get(&#39;need_summary&#39;)</pre> <pre class=”line before”><span class=”ws”> </span>need_keywords = request.args.get(&#39;need_keywords&#39;)</pre> <pre class=”line current”><span class=”ws”> </span>new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度</pre> <pre class=”line after”><span class=”ws”> </span>return new_content</pre> <pre class=”line after”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line after”><span class=”ws”></span>def get_new_content(engine_type,need_summary,need_keywords,init_content):</pre> <pre class=”line after”><span class=”ws”> </span>if engine_type == RewriteEnum.EngineType.WENXINYIYAN:</pre> <pre class=”line after”><span class=”ws”> </span>new_content = get_wp_post_wx_continue(need_summary,need_keywords ,init_content)</pre></div> </div> <li><div class=”frame” id=”frame-2551877973488″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\decorator.py”</cite>, line <em class=”line”>232</em>, in <code class=”function”>fun</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>yield res</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>def fun(*args, **kw):</pre> <pre class=”line before”><span class=”ws”> </span>if not kwsyntax:</pre> <pre class=”line before”><span class=”ws”> </span>args, kw = fix(args, kw, sig)</pre> <pre class=”line current”><span class=”ws”> </span>return caller(func, *(extras + args), **kw)</pre> <pre class=”line after”><span class=”ws”> </span>fun.__name__ = func.__name__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__doc__ = func.__doc__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__wrapped__ = func</pre> <pre class=”line after”><span class=”ws”> </span>fun.__signature__ = sig</pre> <pre class=”line after”><span class=”ws”> </span>fun.__qualname__ = func.__qualname__</pre></div> </div> <li><div class=”frame” id=”frame-2551877973600″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>retry_decorator</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>@decorator</pre> <pre class=”line before”><span class=”ws”> </span>def retry_decorator(f, *fargs, **fkwargs):</pre> <pre class=”line before”><span class=”ws”> </span>args = fargs if fargs else list()</pre> <pre class=”line before”><span class=”ws”> </span>kwargs = fkwargs if fkwargs else dict()</pre> <pre class=”line current”><span class=”ws”> </span>return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,</pre> <pre class=”line after”><span class=”ws”> </span>logger)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return retry_decorator</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877973712″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>33</em>, in <code class=”function”>__retry_internal</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>:returns: the result of the f function.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>_tries, _delay = tries, delay</pre> <pre class=”line before”><span class=”ws”> </span>while _tries:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>return f()</pre> <pre class=”line after”><span class=”ws”> </span>except exceptions as e:</pre> <pre class=”line after”><span class=”ws”> </span>_tries -= 1</pre> <pre class=”line after”><span class=”ws”> </span>if not _tries:</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877973824″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>329</em>, in <code class=”function”>get_new_content</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line before”><span class=”ws”></span>def get_new_content(engine_type,need_summary,need_keywords,init_content):</pre> <pre class=”line before”><span class=”ws”> </span>if engine_type == RewriteEnum.EngineType.WENXINYIYAN:</pre> <pre class=”line before”><span class=”ws”> </span>new_content = get_wp_post_wx_continue(need_summary,need_keywords ,init_content)</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line current”><span class=”ws”> </span>new_content = get_new_content_chatglm(init_content)</pre> <pre class=”line after”><span class=”ws”> </span>return new_content</pre> <pre class=”line after”><span class=”ws”></span>@retry(exceptions=ConnectionError,tries=tries,delay=1)</pre> <pre class=”line after”><span class=”ws”></span>def get_new_content_chatglm(content):</pre> <pre class=”line after”><span class=”ws”> </span>payload = {</pre> <pre class=”line after”><span class=”ws”> </span>&#34;model&#34;: &#34;chatglm3-6b&#34;,</pre></div> </div> <li><div class=”frame” id=”frame-2551877974048″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\decorator.py”</cite>, line <em class=”line”>232</em>, in <code class=”function”>fun</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>yield res</pre> <pre class=”line before”><span class=”ws”> </span>else:</pre> <pre class=”line before”><span class=”ws”> </span>def fun(*args, **kw):</pre> <pre class=”line before”><span class=”ws”> </span>if not kwsyntax:</pre> <pre class=”line before”><span class=”ws”> </span>args, kw = fix(args, kw, sig)</pre> <pre class=”line current”><span class=”ws”> </span>return caller(func, *(extras + args), **kw)</pre> <pre class=”line after”><span class=”ws”> </span>fun.__name__ = func.__name__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__doc__ = func.__doc__</pre> <pre class=”line after”><span class=”ws”> </span>fun.__wrapped__ = func</pre> <pre class=”line after”><span class=”ws”> </span>fun.__signature__ = sig</pre> <pre class=”line after”><span class=”ws”> </span>fun.__qualname__ = func.__qualname__</pre></div> </div> <li><div class=”frame” id=”frame-2551877974160″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>73</em>, in <code class=”function”>retry_decorator</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>@decorator</pre> <pre class=”line before”><span class=”ws”> </span>def retry_decorator(f, *fargs, **fkwargs):</pre> <pre class=”line before”><span class=”ws”> </span>args = fargs if fargs else list()</pre> <pre class=”line before”><span class=”ws”> </span>kwargs = fkwargs if fkwargs else dict()</pre> <pre class=”line current”><span class=”ws”> </span>return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,</pre> <pre class=”line after”><span class=”ws”> </span>logger)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return retry_decorator</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877974272″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\retry\api.py”</cite>, line <em class=”line”>33</em>, in <code class=”function”>__retry_internal</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>:returns: the result of the f function.</pre> <pre class=”line before”><span class=”ws”> </span>&#34;&#34;&#34;</pre> <pre class=”line before”><span class=”ws”> </span>_tries, _delay = tries, delay</pre> <pre class=”line before”><span class=”ws”> </span>while _tries:</pre> <pre class=”line before”><span class=”ws”> </span>try:</pre> <pre class=”line current”><span class=”ws”> </span>return f()</pre> <pre class=”line after”><span class=”ws”> </span>except exceptions as e:</pre> <pre class=”line after”><span class=”ws”> </span>_tries -= 1</pre> <pre class=”line after”><span class=”ws”> </span>if not _tries:</pre> <pre class=”line after”><span class=”ws”> </span>raise</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877974384″> <h4>File <cite class=”filename”>”F:\project\wxgzh\model_server.py”</cite>, line <em class=”line”>355</em>, in <code class=”function”>get_new_content_chatglm</code></h4> <div class=”source “><pre class=”line before”><span class=”ws”> </span>&#34;functions&#34;: {},</pre> <pre class=”line before”><span class=”ws”> </span>&#34;repetition_penalty&#34;: 1.1</pre> <pre class=”line before”><span class=”ws”> </span>}</pre> <pre class=”line before”><span class=”ws”> </span>headers = {&#34;content-type&#34;: &#34;application/json&#34;}</pre> <pre class=”line before”><span class=”ws”> </span>task_start_time = time.time()</pre> <pre class=”line current”><span class=”ws”> </span>response = requests.request(&#34;POST&#34;, chatglm_url, json=payload, headers=headers)</pre> <pre class=”line after”><span class=”ws”> </span>#print(response)</pre> <pre class=”line after”><span class=”ws”> </span>data = response.json()</pre> <pre class=”line after”><span class=”ws”> </span>print(json.dumps(data, indent=4))</pre> <pre class=”line after”><span class=”ws”> </span>new_content = data[&#39;choices&#39;][0][&#39;message&#39;][&#39;content&#39;]</pre> <pre class=”line after”><span class=”ws”> </span>new_content = new_content.replace(&#34;重新改写后:&#34;, &#34;&#34;).replace(&#34;&#34;, &#34;&#34;)</pre></div> </div> <li><div class=”frame” id=”frame-2551877974496″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\api.py”</cite>, line <em class=”line”>59</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># By using the &#39;with&#39; statement we are sure the session is closed, thus we</pre> <pre class=”line before”><span class=”ws”> </span># avoid leaving sockets open which can trigger a ResourceWarning in some</pre> <pre class=”line before”><span class=”ws”> </span># cases, and look like a memory leak in others.</pre> <pre class=”line before”><span class=”ws”> </span>with sessions.Session() as session:</pre> <pre class=”line current”><span class=”ws”> </span>return session.request(method=method, url=url, **kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”></span>def get(url, params=None, **kwargs):</pre> <pre class=”line after”><span class=”ws”> </span>r&#34;&#34;&#34;Sends a GET request.</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877974720″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”</cite>, line <em class=”line”>589</em>, in <code class=”function”>request</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”> </span>send_kwargs = {</pre> <pre class=”line before”><span class=”ws”> </span>&#34;timeout&#34;: timeout,</pre> <pre class=”line before”><span class=”ws”> </span>&#34;allow_redirects&#34;: allow_redirects,</pre> <pre class=”line before”><span class=”ws”> </span>}</pre> <pre class=”line before”><span class=”ws”> </span>send_kwargs.update(settings)</pre> <pre class=”line current”><span class=”ws”> </span>resp = self.send(prep, **send_kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>return resp</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>def get(self, url, **kwargs):</pre> <pre class=”line after”><span class=”ws”> </span>r&#34;&#34;&#34;Sends a GET request. Returns :class:`Response` object.</pre></div> </div> <li><div class=”frame” id=”frame-2551877974832″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”</cite>, line <em class=”line”>703</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Start time (approximately) of the request</pre> <pre class=”line before”><span class=”ws”> </span>start = preferred_clock()</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span># Send the request</pre> <pre class=”line current”><span class=”ws”> </span>r = adapter.send(request, **kwargs)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span># Total elapsed time of the request (approximately)</pre> <pre class=”line after”><span class=”ws”> </span>elapsed = preferred_clock() – start</pre> <pre class=”line after”><span class=”ws”> </span>r.elapsed = timedelta(seconds=elapsed)</pre> <pre class=”line after”><span class=”ws”></span> </pre></div> </div> <li><div class=”frame” id=”frame-2551877974944″> <h4>File <cite class=”filename”>”F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”</cite>, line <em class=”line”>519</em>, in <code class=”function”>send</code></h4> <div class=”source library”><pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line before”><span class=”ws”> </span>if isinstance(e.reason, _SSLError):</pre> <pre class=”line before”><span class=”ws”> </span># This branch is for urllib3 v1.22 and later.</pre> <pre class=”line before”><span class=”ws”> </span>raise SSLError(e, request=request)</pre> <pre class=”line before”><span class=”ws”></span> </pre> <pre class=”line current”><span class=”ws”> </span>raise ConnectionError(e, request=request)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except ClosedPoolError as e:</pre> <pre class=”line after”><span class=”ws”> </span>raise ConnectionError(e, request=request)</pre> <pre class=”line after”><span class=”ws”></span> </pre> <pre class=”line after”><span class=”ws”> </span>except _ProxyError as e:</pre></div> </div> </ul> <blockquote>requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </blockquote> </div> <div class=”plain”> <p> This is the Copy/Paste friendly version of the traceback. </p> <textarea cols=”50″ rows=”10″ name=”code” readonly>Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 203, in _new_conn sock = connection.create_connection( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py&#34;, line 85, in create_connection raise err File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py&#34;, line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 790, in urlopen response = self._make_request( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 496, in _make_request conn.request( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 395, in request self.endheaders() File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 1040, in _send_output self.send(msg) File &#34;C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py&#34;, line 980, in send self.connect() File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 243, in connect self.sock = self._new_conn() File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py&#34;, line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py&#34;, line 486, in send resp = conn.urlopen( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py&#34;, line 844, in urlopen retries = retries.increment( File &#34;F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py&#34;, line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1478, in __call__ return self.wsgi_app(environ, start_response) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1458, in wsgi_app response = self.handle_exception(e) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 1455, in wsgi_app response = self.full_dispatch_request() File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 869, in full_dispatch_request rv = self.handle_user_exception(e) File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 867, in full_dispatch_request rv = self.dispatch_request() File &#34;F:\project\wxgzh\venv\lib\site-packages\flask\app.py&#34;, line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File &#34;F:\project\wxgzh\model_server.py&#34;, line 322, in get_new_content_api new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度 File &#34;F:\project\wxgzh\venv\lib\site-packages\decorator.py&#34;, line 232, in fun return caller(func, *(extras + args), **kw) File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 33, in __retry_internal return f() File &#34;F:\project\wxgzh\model_server.py&#34;, line 329, in get_new_content new_content = get_new_content_chatglm(init_content) File &#34;F:\project\wxgzh\venv\lib\site-packages\decorator.py&#34;, line 232, in fun return caller(func, *(extras + args), **kw) File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File &#34;F:\project\wxgzh\venv\lib\site-packages\retry\api.py&#34;, line 33, in __retry_internal return f() File &#34;F:\project\wxgzh\model_server.py&#34;, line 355, in get_new_content_chatglm response = requests.request(&#34;POST&#34;, chatglm_url, json=payload, headers=headers) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\api.py&#34;, line 59, in request return session.request(method=method, url=url, **kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py&#34;, line 589, in request resp = self.send(prep, **send_kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py&#34;, line 703, in send r = adapter.send(request, **kwargs) File &#34;F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py&#34;, line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;127.0.0.1&#39;, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(&#39;&lt;urllib3.connection.HTTPConnection object at 0x0000025227C826D0&gt;: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。&#39;)) </textarea> </div> <div class=”explanation”> The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. <span class=”nojavascript”> If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.</span> </div> <div class=”footer”> Brought to you by <strong class=”arthur”>DON’T PANIC</strong>, your friendly Werkzeug powered traceback interpreter. </div> </div> <div class=”pin-prompt”> <div class=”inner”> <h3>Console Locked</h3> <p> The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server. <form> <p>PIN: <input type=text name=pin size=14> <input type=submit name=btn value=”Confirm Pin”> </form> </div> </div> </body> </html> <!– Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 203, in _new_conn sock = connection.create_connection( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”, line 85, in create_connection raise err File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\connection.py”, line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 790, in urlopen response = self._make_request( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 496, in _make_request conn.request( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 395, in request self.endheaders() File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 1040, in _send_output self.send(msg) File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\http\client.py”, line 980, in send self.connect() File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 243, in connect self.sock = self._new_conn() File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connection.py”, line 218, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000025227C826D0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 The above exception was the direct cause of the following exception: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”, line 486, in send resp = conn.urlopen( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\connectionpool.py”, line 844, in urlopen retries = retries.increment( File “F:\project\wxgzh\venv\lib\site-packages\urllib3\util\retry.py”, line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=’127.0.0.1′, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x0000025227C826D0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1478, in __call__ return self.wsgi_app(environ, start_response) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1458, in wsgi_app response = self.handle_exception(e) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 1455, in wsgi_app response = self.full_dispatch_request() File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 869, in full_dispatch_request rv = self.handle_user_exception(e) File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 867, in full_dispatch_request rv = self.dispatch_request() File “F:\project\wxgzh\venv\lib\site-packages\flask\app.py”, line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File “F:\project\wxgzh\model_server.py”, line 322, in get_new_content_api new_content = get_new_content(engine_type,need_summary,need_keywords,content) # 传递 len 参数,使用 30 作为长度 File “F:\project\wxgzh\venv\lib\site-packages\decorator.py”, line 232, in fun return caller(func, *(extras + args), **kw) File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 33, in __retry_internal return f() File “F:\project\wxgzh\model_server.py”, line 329, in get_new_content new_content = get_new_content_chatglm(init_content) File “F:\project\wxgzh\venv\lib\site-packages\decorator.py”, line 232, in fun return caller(func, *(extras + args), **kw) File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 73, in retry_decorator return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, File “F:\project\wxgzh\venv\lib\site-packages\retry\api.py”, line 33, in __retry_internal return f() File “F:\project\wxgzh\model_server.py”, line 355, in get_new_content_chatglm response = requests.request(“POST”, chatglm_url, json=payload, headers=headers) File “F:\project\wxgzh\venv\lib\site-packages\requests\api.py”, line 59, in request return session.request(method=method, url=url, **kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”, line 589, in request resp = self.send(prep, **send_kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\sessions.py”, line 703, in send r = adapter.send(request, **kwargs) File “F:\project\wxgzh\venv\lib\site-packages\requests\adapters.py”, line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host=’127.0.0.1′, port=7861): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x0000025227C826D0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。’)) –>

而且现阶段的AI已经能辅助进行设计,视觉效果相当吸睛。

UI/UX设计师如何利用Midjourney来加速设计流程,是我们今天要探讨的话题。通过具体的实操案例,我们可以从主体、配色和风格等方面深入探讨AI在设计中的应用,从而更好地利用这一工具提升我们的工作效率。

一、AI设计指令

在Midjourney中,我们并没有设定一个固定的Prompt(指令)来生成特定的APP,而是鼓励大家通过多次尝试,探索出想要实现的效果。

如果没想好要输入哪些指令,可以先用这个指令模板:

在本文中,我们将探讨如何针对[类型]应用程序进行UI设计,包括移动应用、iPhone以及iOS系统。我们还将介绍Apple Design Award的评选标准,并通过 screenshot 和单屏界面的高分辨率展示来呈现优秀的设计作品。此外,我们还将在Dribbble上分享这些精彩的设计案例。

通过将内部元素替换为所期望的商品关键描述(英文),即可创建所需的UI设计图。以下是一些示例说明这一方法的应用。

1. 出行类

关键词:「距离、车费、费用结算、优惠金额、地图」等。

2. 餐饮类

关键词:「介绍咖啡的特色、口味、咖啡豆产地、价格」等。

3. 运动类

关键词:「卡路里、步数、距离、某种运动」等描述。

二、主体物指令

确定了产品类型后,如果还想更进一步突显产品的特色,可以在指令中加入主体描述来加强图片生成的效果。

在撰写关于生鲜类APP的文章时,为了更好地突显蔬果的新鲜程度,我们可以运用更多的相关关键词来描述,如「新鲜度」、「有机」、「无农药残留」等。这样一来,生成的图片也会给人一种非常新鲜的感觉。通过这种方式,不仅可以吸引消费者的眼球,还可以提升产品的品质形象,从而更好地满足消费者对于食品质量的追求。

电商类产品加上「模特实拍、商品列表、尺寸」等描述,就能得到一个常见的商品详情页设计图。

三、配色指令

在确定APP类型和主题描述之后,您仍有机会选择适合的主色调。您可以尝试使用「xxx color scheme」这个指令来设定配色方案。

1. 餐饮类

关键词:「beach style color」,就能生成一个沙滩风饮料订购页面,设计风格也很有意思。

2. 快递类

关键词:输入「Forest」指令,生成的图片会长很多树,有一种亲近自然的感觉。

3. 生活服务类

关键词:「glacier color scheme」,可以得到一个很有氛围感的订房界面。

四、风格指令

如果只依靠输入配色指令无法满足你的要求,还可以指定某种艺术风格,甚至艺术家、设计师、插画家的名字。

1. 天气类

关键词:「Pop art」,一个色彩鲜艳配色大胆图案抢眼的波普艺术风格的天气APP就生成了。

2. 社交类

例如一个聊天类软件,输入关键词「K-pop fashion」,生成一个时尚流行的页面效果。

输入「by Van Gogh」,就能得到一个带有梵高作品的UI页面。

五、页面指令

如果想指定AI生成某个页面(首页、登录页等),只需要再加一段页面指令描述就可以,例如「landing page、Profile Page」。

1. 社交平台

关键词:「landing page」,一个社交平台的登录页设计就出来了。

2. 信息类

关键词:「Profile Page」,生成人力资源类产品的个人资料页,里面包含照片、自我介绍、基本信息等内容。

六、最后

通过一系列的AI出图操作能发现,Midjourney产出的设计图视觉效果都很不错,更适合在APP设计的初始阶段,例如头脑风暴和风格探索等过程中,为设计师提供更多灵感和创意。

如果想让Midjourney产出的UI设计图直接落地开发,目前来看仍有一段距离,但按照AI现在的技术迭代速度,这个距离应该也不会太远…

专栏作家

Clippp;微信公众号:Clip设计夹。人人都是产品经理专栏作家。每周精选设计文章,专注分享关于产品、交互、UI视觉上的设计思考。

题图来自 Unsplash,基于CC0协议。返回搜狐,查看更多

责任编辑:

AI时代,拥有个人微信机器人AI助手!AI时代不落人后!

免费ChatGPT问答,办公、写作、生活好得力助手!

搜索微信号aigc666aigc999或上边扫码,即可拥有个人AI助手!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注