SeaHOH / GotoX

本地自动代理,修改自 goagent。
730 stars 148 forks source link

启动出错TypeError: cannot use a string pattern on a bytes-like object #94

Closed ghost closed 6 years ago

ghost commented 6 years ago

python 3.6.5

Traceback (most recent call last):
  File "start.py", line 13, in <module>
    from local import proxy
  File "GotoX-7b816f6/local/proxy.py", line 64, in <module>
    from .ProxyServer import network_test, start_proxyserver
  File "GotoX-7b816f6/local/ProxyServer.py", line 13, in <module>
    from .common.dns import reset_dns, update_dns_params
  File "GotoX-7b816f6/local/common/dns.py", line 307, in <module>
    local_dnsservers = set(ip for ip in get_dnsserver_list() if isip(ip))
  File "GotoX-7b816f6/local/common/dns.py", line 301, in get_dnsserver_list
    return re.findall(r'(?m)^nameserver\s+(\S+)', fp.read())
  File "/usr/lib64/python3.6/re.py", line 222, in findall
    return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object
SeaHOH commented 6 years ago

谢谢反馈。 之前这段照抄的是 Python2 的,没检查到。