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

可能是封了外网ip #38

Open
ckqqqq opened this issue Nov 3, 2022 · 28 comments
Open

可能是封了外网ip #38

ckqqqq opened this issue Nov 3, 2022 · 28 comments

Comments

@ckqqqq
Copy link

ckqqqq commented Nov 3, 2022

账号数量:1
--User 1--
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='m.bjyouth.net', port=443): Max retries exceeded with url: /site/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa144955d90>: Failed to establish a new connection: [Errno 110] Connection timed out'))
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='m.bjyouth.net', port=443): Max retries exceeded with url: /site/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa1446cf090>: Failed to establish a new connection: [Errno 110] Connection timed out'))

@lj976264709
Copy link

我也遇到了这个问题.....是封了Github的IP嘛

@skycosmos
Copy link

11月3日凌晨还是正常的,11月3日中午就出现上述情况。感觉是封了GitHub的IP。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/runner/work/Beijing_Daxuexi/Beijing_Daxuexi/study.py", line 20, in study
touch = bjySession.get(url="https://m.bjyouth.net/site/login")
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='m.bjyouth.net', port=443): Max retries exceeded with url: /site/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8d01119790>: Failed to establish a new connection: [Errno 110] Connection timed out'))
Error: The operation was canceled.

@skycosmos
Copy link

不知道可否利用本地运行的办法来解决。

@Gu0E
Copy link

Gu0E commented Nov 4, 2022

亲测本地运行可以,直接在main.py里把username和password写上去就行

不知道可否利用本地运行的办法来解决。

@ckqqqq
Copy link
Author

ckqqqq commented Nov 4, 2022

修改username和password
建立一个bat文件
@echo off d: cd %~dp0 ::在bat中执行cmd cmd /k "cd /d D:\Code\Python\daxuexi\Beijing_Daxuexi_Simple&&D:\TOOL\Anaconda\Anaconda_root\python.exe D:\Code\Python\daxuexi\Beijing_Daxuexi_Simple\main.py" exit
建立一个计时器每2天运行一次bat就行
图片

@ckqqqq
Copy link
Author

ckqqqq commented Nov 4, 2022

图片

@Gu0E
Copy link

Gu0E commented Nov 6, 2022

图片

我在本地运行的时候出现了类似主楼的报错,请问一下是哪里出了问题呢?

这是我的bat文件
@echo off
d:
cd %~dp0
::在bat中执行cmd
cmd /k "cd /d "D:\GitHub\Beijing_Daxuexi_Simple" && "D:\Program Files\Python310\python.exe" D:\GitHub\Beijing_Daxuexi_Simple\main.py"
exit

这是报错内容

Traceback (most recent call last):
File "D:\GitHub\Beijing_Daxuexi_Simple\main.py", line 4, in
from study import study
File "D:\GitHub\Beijing_Daxuexi_Simple\study.py", line 8, in
from utility import encrypt, cap_recognize
File "D:\GitHub\Beijing_Daxuexi_Simple\utility.py", line 4, in
from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
ModuleNotFoundError: No module named 'Crypto'

@SakuraLaurel
Copy link

SakuraLaurel commented Nov 7, 2022

本地运行,也可以登录 https://m.bjyouth.net/site/login 后,在控制台输入命令后回车:
fetch('https://m.bjyouth.net/dxx/index',{method:'get'}).then(res=>{res.json().then(id=>{fetch('https://m.bjyouth.net/dxx/is-league',{method:'get'}).then(res=>{res.json().then(org_id=>{fetch('https://m.bjyouth.net/dxx/check', {'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON.stringify({id:id['newCourse']['id'].toString(),org_id:org_id})})})})})})

@MegaOwIer
Copy link

MegaOwIer commented Nov 9, 2022

图片

我在本地运行的时候出现了类似主楼的报错,请问一下是哪里出了问题呢?

这是我的bat文件 @echo off d: cd %~dp0 ::在bat中执行cmd cmd /k "cd /d "D:\GitHub\Beijing_Daxuexi_Simple" && "D:\Program Files\Python310\python.exe" D:\GitHub\Beijing_Daxuexi_Simple\main.py" exit

这是报错内容

Traceback (most recent call last): File "D:\GitHub\Beijing_Daxuexi_Simple\main.py", line 4, in from study import study File "D:\GitHub\Beijing_Daxuexi_Simple\study.py", line 8, in from utility import encrypt, cap_recognize File "D:\GitHub\Beijing_Daxuexi_Simple\utility.py", line 4, in from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5 ModuleNotFoundError: No module named 'Crypto'

如果你确定所有依赖的模块都已经安装了可以检查一下安装好的 Crypto 模块的文件夹名称是不是 crypto,是的话把首字母改成大写就行。

当然直接用 pipenv 之类的东西新建一个虚拟环境应该不会遇到这种问题。

@hauzax
Copy link

hauzax commented Nov 9, 2022

同本地报错,求问
Traceback (most recent call last):
File "/Users/qiaohaoran/Beijing_Daxuexi_Simple/main.py", line 4, in
from study import study
File "/Users/qiaohaoran/Beijing_Daxuexi_Simple/study.py", line 8, in
from utility import encrypt, cap_recognize
File "/Users/qiaohaoran/Beijing_Daxuexi_Simple/utility.py", line 4, in
from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Crypto/Cipher/PKCS1_v1_5.py", line 73, in
from Crypto.Util.number import ceil_div
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Crypto/Util/number.py", line 139
value |= 2L ** (N-1) # Ensure high bit is set
^
SyntaxError: invalid decimal literal

@Gu0E
Copy link

Gu0E commented Nov 10, 2022

图片

我在本地运行的时候出现了类似主楼的报错,请问一下是哪里出了问题呢?
这是我的bat文件 @echo off d: cd %~dp0 ::在bat中执行cmd cmd /k "cd /d "D:\GitHub\Beijing_Daxuexi_Simple" && "D:\Program Files\Python310\python.exe" D:\GitHub\Beijing_Daxuexi_Simple\main.py" exit
这是报错内容
Traceback (most recent call last): File "D:\GitHub\Beijing_Daxuexi_Simple\main.py", line 4, in from study import study File "D:\GitHub\Beijing_Daxuexi_Simple\study.py", line 8, in from utility import encrypt, cap_recognize File "D:\GitHub\Beijing_Daxuexi_Simple\utility.py", line 4, in from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5 ModuleNotFoundError: No module named 'Crypto'

如果你确定所有依赖的模块都已经安装了可以检查一下安装好的 Crypto 模块的文件夹名称是不是 crypto,是的话把首字母改成大写就行。

当然直接用 pipenv 之类的东西新建一个虚拟环境应该不会遇到这种问题。

笑死我了,因为不知道依赖模块安装在哪,我把utility里的大写改成小写之后,pycharm里重新运行,就变成和上面一样的报错了(本来pycharm还可以跑)

@ckqqqq
Copy link
Author

ckqqqq commented Nov 10, 2022

安装依赖命令 pip install -r requirements.txt

@MegaOwIer
Copy link

图片

我在本地运行的时候出现了类似主楼的报错,请问一下是哪里出了问题呢?
这是我的bat文件 @echo off d: cd %~dp0 ::在bat中执行cmd cmd /k "cd /d "D:\GitHub\Beijing_Daxuexi_Simple" && "D:\Program Files\Python310\python.exe" D:\GitHub\Beijing_Daxuexi_Simple\main.py" exit
这是报错内容
Traceback (most recent call last): File "D:\GitHub\Beijing_Daxuexi_Simple\main.py", line 4, in from study import study File "D:\GitHub\Beijing_Daxuexi_Simple\study.py", line 8, in from utility import encrypt, cap_recognize File "D:\GitHub\Beijing_Daxuexi_Simple\utility.py", line 4, in from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5 ModuleNotFoundError: No module named 'Crypto'

如果你确定所有依赖的模块都已经安装了可以检查一下安装好的 Crypto 模块的文件夹名称是不是 crypto,是的话把首字母改成大写就行。
当然直接用 pipenv 之类的东西新建一个虚拟环境应该不会遇到这种问题。

笑死我了,因为不知道依赖模块安装在哪,我把utility里的大写改成小写之后,pycharm里重新运行,就变成和上面一样的报错了(本来pycharm还可以跑)

utility 显然不行,因为库代码里面写的也是 Crypto

@Gu0E
Copy link

Gu0E commented Nov 10, 2022

图片

我在本地运行的时候出现了类似主楼的报错,请问一下是哪里出了问题呢?
这是我的bat文件 @echo off d: cd %~dp0 ::在bat中执行cmd cmd /k "cd /d "D:\GitHub\Beijing_Daxuexi_Simple" && "D:\Program Files\Python310\python.exe" D:\GitHub\Beijing_Daxuexi_Simple\main.py" exit
这是报错内容
Traceback (most recent call last): File "D:\GitHub\Beijing_Daxuexi_Simple\main.py", line 4, in from study import study File "D:\GitHub\Beijing_Daxuexi_Simple\study.py", line 8, in from utility import encrypt, cap_recognize File "D:\GitHub\Beijing_Daxuexi_Simple\utility.py", line 4, in from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5 ModuleNotFoundError: No module named 'Crypto'

如果你确定所有依赖的模块都已经安装了可以检查一下安装好的 Crypto 模块的文件夹名称是不是 crypto,是的话把首字母改成大写就行。
当然直接用 pipenv 之类的东西新建一个虚拟环境应该不会遇到这种问题。

笑死我了,因为不知道依赖模块安装在哪,我把utility里的大写改成小写之后,pycharm里重新运行,就变成和上面一样的报错了(本来pycharm还可以跑)

utility 显然不行,因为库代码里面写的也是 Crypto

已经死心了,每周打开pycharm手动跑一次8,总比老老实实看要省心,已经方便多了,感谢大佬

@AtlandisLee
Copy link

我在本地运行的时候无法安装onnx包应该怎么办呢,求助大佬
ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)
ERROR: No matching distribution found for onnxruntime

@ckqqqq
Copy link
Author

ckqqqq commented Nov 11, 2022

关闭所有vpn,cd 到项目根目录下运行
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

@ckqqqq
Copy link
Author

ckqqqq commented Nov 11, 2022

我在本地运行的时候无法安装onnx包应该怎么办呢,求助大佬 ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none) ERROR: No matching distribution found for onnxruntime

如果还不行就编辑requirements.txt 然后把所有版本信息删掉

@AtlandisLee
Copy link

vpn关掉了,还是不行orz
requirements里面我好像没看到有版本信息
我的python是3.11,这会有问题吗?

@ckqqqq
Copy link
Author

ckqqqq commented Nov 11, 2022

我的版本信息
sys:win 11
virtural env:anaconda
pip:21.2.4
python:3.9
image
1 py11确实好新。
2 windows的任务计划程序需要用管理员模式跑bat。
3 如果import本地包有问题,多半是路径问题,可能需要手动设置根目录。

@AtlandisLee
Copy link

1668147938185

我现在只期望能手动跑通就足够了; 我现在还是卡在pip这一步上

@ckqqqq
Copy link
Author

ckqqqq commented Nov 11, 2022

1668147938185

我现在只期望能手动跑通就足够了; 我现在还是卡在pip这一步上

https://pypi.org/project/onnxruntime/
https://blog.csdn.net/kun78684504/article/details/124983444

@AtlandisLee
Copy link

1668147938185 我现在只期望能手动跑通就足够了; 我现在还是卡在pip这一步上

https://pypi.org/project/onnxruntime/ https://blog.csdn.net/kun78684504/article/details/124983444

我尝试了手动安装,最后发现问题还是出在python版本上,python3.11不支持onnx的任何一个wheel版本,我下载了python3.9后直接pip就成功了,非常感谢Orz
然后,在之前github action还可以工作的时候我就发现了一个问题,并且这个问题在本地运行也出现了,对于较长的USERNAME序列,总会在第8个用户附近失败
image
image

@surreyskahn
Copy link

请问大家多账号怎么填写USERMANE 和 PASSWORD

@xiaotianxt
Copy link

今天跑成功了一次

@tianzhengs
Copy link
Owner

Github Actions的没有效果啦

今天跑成功了一次

@xiaotianxt
Copy link

Github Actions的没有效果啦

今天跑成功了一次

😭

@DBeidachazi
Copy link

请问一下username和password填的是微信的吗

@ckqqqq
Copy link
Author

ckqqqq commented Dec 5, 2022

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