-
Notifications
You must be signed in to change notification settings - Fork 164
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
'NoneType' object has no attribute 'group' #240
Comments
debug发现,output_pre是空字符串 |
命令拼接的不对,应该是/proc/{pid}/net/dev,此处应为/proc/6469/net/dev |
应该不会出现这种情况吧,你界面截图我看看你选择的进程是长啥样的? |
rmnet0是移动网络,界面关掉wifi开关才会去统计 |
哦你是用api是吧,要自己处理一下,如果是用界面测试不会有这种情况 |
这里可以做一个兜底判断,正则匹配失败的话,直接返回0和异常信息,这样控制台也不打印报错 |
界面是返回0啊,异常信息是给开发者看的。我的设备没出现你们的问题。不要改solox的代码,换一台手机试试。 |
我还原了代码也是同样的问题,终端和界面,在安卓13下无法获取流量的数据,可能是安卓13修改了某些内容。 |
我这一样,打算自行搜索一下这个问题 |
如果找出问题,提个PR看看,我没手机搞了。不影响旧版本就行,应该是用rmnet_data的数据,兼容一下 |
[E 231123 14:43:32 apm:264] 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "C:\Users\lizhendong\miniconda3\envs\testSoloX\Lib\site-packages\solox\public\apm.py", line 250, in getAndroidNet
sendNum_pre = round(float(float(m_pre.group(2)) / 1024), 2)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
一直报这个错误
The text was updated successfully, but these errors were encountered: