Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

后台运行,用一会就用不了了 #21

Closed
longwangjiang opened this issue Jan 1, 2023 · 7 comments
Closed

后台运行,用一会就用不了了 #21

longwangjiang opened this issue Jan 1, 2023 · 7 comments

Comments

@longwangjiang
Copy link

后台运行,用一会就用不了了,看了一下nohup.out提示
IndexError: tuple index out of range

LOG OUT!
这个怎么解决。。。。怎么守护一下进程。

@zhayujie
Copy link
Owner

zhayujie commented Jan 1, 2023

是开始的时候可以正常自动回复,运行一会才报错的? 你的操作系统和python版本分别是什么,有没有更详细的报错信息?

@longwangjiang
Copy link
Author

是开始正常运行,运行一会就会报错,操作系统是debian,我在软路由上pve虚拟的debian,python3.7.3。。。现在是用一会就不行了,时间不定。目前又不行了,需要重新运行才能使用。
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 288, in maintain_loop
i = sync_check(self)
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 351, in sync_check
if not isinstance(e.args[0].args[1], BadStatusLine):
IndexError: tuple index out of range

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 187, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fd7d2450f28>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 499, in send
timeout=timeout,
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1672638968642&skey=%40crypt_839e2826_ad7cf0e49a1841a6ad7b51fe42a8630e&sid=er0q2mFv7kZMuhML&uin=669549741&deviceid=e123693326327642&synckey=1_698811499%7C2_698811901%7C3_698811833%7C11_698811747%7C19_26943%7C23_1672567723%7C24_1672638815%7C27_725247%7C201_1672638815%7C202_1672637105%7C203_1672635053%7C206_108%7C1000_1672635605%7C1001_1672635843&
=1672567727877 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd7d2450f28>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 348, in sync_check
timeout=config.TIMEOUT)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='webpush.wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1672638968642&skey=%40crypt_839e2826_ad7cf0e49a1841a6ad7b51fe42a8630e&sid=er0q2mFv7kZMuhML&uin=669549741&deviceid=e123693326327642&synckey=1_698811499%7C2_698811901%7C3_698811833%7C11_698811747%7C19_26943%7C23_1672567723%7C24_1672638815%7C27_725247%7C201_1672638815%7C202_1672637105%7C203_1672635053%7C206_108%7C1000_1672635605%7C1001_1672635843&_=1672567727877 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd7d2450f28>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 288, in maintain_loop
i = sync_check(self)
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 351, in sync_check
if not isinstance(e.args[0].args[1], BadStatusLine):
IndexError: tuple index out of range

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 72, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 187, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fd7b4d46cc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 499, in send
timeout=timeout,
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1672638991030&skey=%40crypt_839e2826_ad7cf0e49a1841a6ad7b51fe42a8630e&sid=er0q2mFv7kZMuhML&uin=669549741&deviceid=e123693326327642&synckey=1_698811499%7C2_698811901%7C3_698811833%7C11_698811747%7C19_26943%7C23_1672567723%7C24_1672638815%7C27_725247%7C201_1672638815%7C202_1672637105%7C203_1672635053%7C206_108%7C1000_1672635605%7C1001_1672635843&
=1672567727879 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd7b4d46cc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 348, in sync_check
timeout=config.TIMEOUT)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='webpush.wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1672638991030&skey=%40crypt_839e2826_ad7cf0e49a1841a6ad7b51fe42a8630e&sid=er0q2mFv7kZMuhML&uin=669549741&deviceid=e123693326327642&synckey=1_698811499%7C2_698811901%7C3_698811833%7C11_698811747%7C19_26943%7C23_1672567723%7C24_1672638815%7C27_725247%7C201_1672638815%7C202_1672637105%7C203_1672635053%7C206_108%7C1000_1672635605%7C1001_1672635843&_=1672567727879 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd7b4d46cc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 288, in maintain_loop
i = sync_check(self)
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 351, in sync_check
if not isinstance(e.args[0].args[1], BadStatusLine):
IndexError: tuple index out of range

LOG OUT!

@longwangjiang
Copy link
Author

这是nohub.out最后面一段的信息。

@zhayujie
Copy link
Owner

zhayujie commented Jan 2, 2023

你有安装 itchat-uos 吗? 可以加下我一起看下这个问题

@longwangjiang
Copy link
Author

怎么加你?itchat-uos是什么,你教程里面没说要装这东西吧。。。加我我可以把ssh告诉你你去看看

@zhayujie
Copy link
Owner

zhayujie commented Jan 2, 2023

怎么加你?itchat-uos是什么,你教程里面没说要装这东西吧。。。加我我可以把ssh告诉你你去看看

README里依赖安装有说明:

pip3 install itchat-uos==1.5.0.dev0

我微信 zhayujie_com

@longwangjiang
Copy link
Author

这个装了,我在装一遍,有个黄色警告,这个因该不影响。我加你了,通过一下

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: There was an error checking the latest version of pip.

@zhayujie zhayujie closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants