drcoms / drcom-generic

Dr.COM/DrCOM 现已覆盖 d p x三版。
GNU Affero General Public License v3.0
1.15k stars 268 forks source link

openwrt luci上的drcom客户端未运行 #301

Closed InDimension closed 6 years ago

InDimension commented 6 years ago

配置好luci页面的参数,并且选择开启Dr.com后,客户端运行检测脚本,即该页面顶端的显示为客户端未运行。且进入openwrt的启动项中,若选择启用Drcom该项,会在刷新后变为禁用。以至于未能正常使用该luci客户端。

InDimension commented 6 years ago

我把python环境卸载后,显示情况一致,猜测是python没有被调用,请问应该如何解决。

InDimension commented 6 years ago

root@OpenWrt:~# drcom Traceback (most recent call last): File "/bin/drcom", line 6, in from hashlib import md5 File "/usr/lib/python2.7/hashlib.py", line 149, in import logging ImportError: No module named logging

RevySR commented 6 years ago

这显示的是你没有logging包吧 试试安装一下? pip install logging

InDimension commented 6 years ago

安装logging包后运行则在md5出现一定问题 root@OpenWrt:~# drcom ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = __get_hash(func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = __get_hash(func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = __get_hash(func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File "/usr/lib/python2.7/hashlib.py", line 147, in globals()[func_name] = get_hash(__func_name) File "/usr/lib/python2.7/hashlib.py", line 97, in get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha512 Traceback (most recent call last): File "/bin/drcom", line 6, in from hashlib import md5 ImportError: cannot import name md5

这里就是软连接的问题了吗?

RevySR commented 6 years ago

看起来像hash全炸了一样 重新装一下hashlib?

InDimension commented 6 years ago

在安装完整的python2.7后出现 root@OpenWrt:~# drcom Traceback (most recent call last): File "/bin/drcom", line 11, in execfile('/etc/config/drcom.conf',globals()) IOError: [Errno 2] No such file or directory: '/etc/config/drcom.conf' 而该目录下的文件为drcom,内容就是luci页面配置的内容 但是项目内文件并没有这方面的文件,暂不清楚是不是源代码有误。

InDimension commented 6 years ago

查看了一下以往相关问题,暂不推荐使用。