报错Caught Exception: invalid literal for int() with base 10: ''
麻烦帮看看这是什么原因,在仅ipv6的Debian11机器上的,改了resolv.conf,所以可以访问ipv4了,但是报错:
Connecting... Authentication successful. Access granted.
You are connecting via: IPv4
Caught Exception: invalid literal for int() with base 10: ''
^CTraceback (most recent call last):
File "/root/client-linux.py", line 308, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/client-linux.py", line 359, in
哦对,只有这个客户端报错了,其他客户端是好的,所以应该不是服务端的问题
python3 --version
python3 --version
3.9.2版本
你机器有多个python环境导致的吧,python 3.9.2 测试无法复现。 @pipidaxian
你机器有多个python环境导致的吧,python 3.9.2 测试无法复现。 @pipidaxian
预装的debian 11自带的吧,刚开的机,还啥也没装,我看了下,好像/use/bin里既有Python 3,也有Python 3.9,是不是问题在这
不太清楚,我测试环境是debian11,python 3.9.2 无法复现。 可以看下出现问题的python具体版本,我好修复。
不太清楚,我测试环境是debian11,python 3.9.2 无法复现。 可以看下出现问题的python具体版本,我好修复。
要怎么看?我这个是一台LXC小鸡,我感觉是不是跟开出来这个VPS的主服务器有关,我现在换成了ubuntu 22.04系统,结果还是一样报错
cat /proc/stat 贴一下

截图不全,应该是你这个文件出现了浮点数,不太确定为什么出现,试试这个文件是否报错。@pipidaxian
wget --no-check-certificate -qO client-linux.py 3.0.3.0/cache/77605047768192515.py
截图不全,应该是你这个文件出现了浮点数,不太确定为什么出现,试试这个文件是否报错。@pipidaxian
wget --no-check-certificate -qO client-linux.py 3.0.3.0/cache/77605047768192515.py
我编辑这个文件指向我的服务端并运行python3后,仍然报错:
Connecting...
Authentication successful. Access granted.
You are connecting via: IPv4
Caught Exception: could not convert string to float: ''
^CTraceback (most recent call last):
File "/root/client-linux.py", line 374, in <module>
CPU = get_cpu()
File "/root/client-linux.py", line 80, in get_cpu
t = delta_time()
File "/root/client-linux.py", line 72, in delta_time
x = get_time()
File "/root/client-linux.py", line 68, in get_time
time_list[i] = int(float(time_list[i]))
ValueError: could not convert string to float: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/client-linux.py", line 427, in <module>
time.sleep(3)
KeyboardInterrupt
有个细节,我的client-linux.py用nano打开编辑,发现中文都是乱码,不能正常显示,是不是跟这个有关系?但我试过删除文件中的中文,也不行。
不太清楚,暂时就在你的小鸡上出现了此问题。 todo
我也出现了今天。只有一个客户端,python 3.10.9
Connecting... Caught Exception: argument should be integer or bytes-like object, not 'str'
python3.9.13版本