m2w icon indicating copy to clipboard operation
m2w copied to clipboard

博主,下面为什么出问题,怎么解决啊,求助求助,折腾好久了/_ \

Open Echo-Kang-hub opened this issue 6 months ago • 2 comments

博主,下面为什么出问题,怎么解决啊,求助求助,折腾好久了/_
(ฅ´ω`ฅ) REST API Mode. Very safe! With legacy.json. Confirm new or changed legacy markdown files. New content! D:/AppDownload/Vaults/Notes/NewVault/Article\测试文章1.md No changed legacy markdown files. Ignored. OOPS, the upload/update process failed! Retrying... Task exception was never retrieved future: <Task finished name='Task-2' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-3' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Retrying... Task exception was never retrieved future: <Task finished name='Task-8' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-9' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-11' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-12' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=ConnectTimeout('_ssl.c:1011: The handshake operation timed out')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 101, in map_httpcore_exceptions yield File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( pool_request.request ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http_proxy.py", line 316, in handle_request stream = stream.start_tls(**kwargs) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http11.py", line 376, in start_tls return self._stream.start_tls(ssl_context, server_hostname, timeout) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_backends\sync.py", line 154, in start_tls with map_exceptions(exc_map): ~~~~~~~~~~~~~~^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1011: The handshake operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 195, in get return request( "GET", ...<9 lines>... trust_env=trust_env, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 109, in request return client.request( ~~~~~~~~~~~~~~^ method=method, ^^^^^^^^^^^^^^ ...<8 lines>... follow_redirects=follow_redirects, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 914, in send response = self._send_handling_auth( request, ...<2 lines>... history=[], ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( request, follow_redirects=follow_redirects, history=history, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 1014, in _send_single_request response = transport.handle_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 249, in handle_request with map_httpcore_exceptions(): ~~~~~~~~~~~~~~~~~~~~~~~^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1011: The handshake operation timed out Task exception was never retrieved future: <Task finished name='Task-14' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-15' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-17' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-18' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-20' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-21' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=ConnectTimeout('_ssl.c:1011: The handshake operation timed out')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 101, in map_httpcore_exceptions yield File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( pool_request.request ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http_proxy.py", line 316, in handle_request stream = stream.start_tls(**kwargs) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http11.py", line 376, in start_tls return self._stream.start_tls(ssl_context, server_hostname, timeout) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_backends\sync.py", line 154, in start_tls with map_exceptions(exc_map): ~~~~~~~~~~~~~~^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1011: The handshake operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 195, in get return request( "GET", ...<9 lines>... trust_env=trust_env, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 109, in request return client.request( ~~~~~~~~~~~~~~^ method=method, ^^^^^^^^^^^^^^ ...<8 lines>... follow_redirects=follow_redirects, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 914, in send response = self._send_handling_auth( request, ...<2 lines>... history=[], ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( request, follow_redirects=follow_redirects, history=history, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 1014, in _send_single_request response = transport.handle_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 249, in handle_request with map_httpcore_exceptions(): ~~~~~~~~~~~~~~~~~~~~~~~^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1011: The handshake operation timed out Task exception was never retrieved future: <Task finished name='Task-23' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-24' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' OOPS, the upload/update process failed! Retrying... OOPS, the upload/update process failed! Maximum retries exceeded. Exiting. Task exception was never retrieved future: <Task finished name='Task-29' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-30' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-5' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-6' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-26' coro=<get_all_articles() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py:29> exception=KeyError('x-wp-total')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\articles.py", line 33, in get_all_articles article_num = httpx.get(self.url + "wp-json/wp/v2/posts?page=1&per_page=1").headers[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 'x-wp-total' ^^^^^^^^^^^^ ] ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_models.py", line 302, in getitem raise KeyError(key) KeyError: 'x-wp-total' Task exception was never retrieved future: <Task finished name='Task-27' coro=<get_all_tags() done, defined at D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py:30> exception=ConnectTimeout('_ssl.c:1011: The handshake operation timed out')> Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 101, in map_httpcore_exceptions yield File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 250, in handle_request resp = self._pool.handle_request(req) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( pool_request.request ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http_proxy.py", line 316, in handle_request stream = stream.start_tls(**kwargs) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_sync\http11.py", line 376, in start_tls return self._stream.start_tls(ssl_context, server_hostname, timeout) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_backends\sync.py", line 154, in start_tls with map_exceptions(exc_map): ~~~~~~~~~~~~~~^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1011: The handshake operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\m2w\rest_api\tags.py", line 34, in get_all_tags tags_num = httpx.get(self.url + "wp-json/wp/v2/tags?page=1&per_page=1").headers[ ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 195, in get return request( "GET", ...<9 lines>... trust_env=trust_env, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_api.py", line 109, in request return client.request( ~~~~~~~~~~~~~~^ method=method, ^^^^^^^^^^^^^^ ...<8 lines>... follow_redirects=follow_redirects, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 825, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 914, in send response = self._send_handling_auth( request, ...<2 lines>... history=[], ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 942, in _send_handling_auth response = self._send_handling_redirects( request, follow_redirects=follow_redirects, history=history, ) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 979, in _send_handling_redirects response = self._send_single_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_client.py", line 1014, in _send_single_request response = transport.handle_request(request) File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 249, in handle_request with map_httpcore_exceptions(): ~~~~~~~~~~~~~~~~~~~~~~~^^ File "D:\AppDownload\Python\py3.13.4\Lib\contextlib.py", line 162, in exit self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "D:\AppDownload\Python\py3.13.4\Lib\site-packages\httpx_transports\default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1011: The handshake operation timed out

Echo-Kang-hub avatar Oct 01 '25 13:10 Echo-Kang-hub

由于未知的原因(推测与WordPress版本更新有关), REST API的失败率比较高。 可以暂时使用Password模式过渡。 之后有机会我会进一步排查原因。

huangwb8 avatar Oct 01 '25 14:10 huangwb8

你把代理关了

dlliang14 avatar Oct 10 '25 09:10 dlliang14