yi-ji / NeteaseMusicAbroad

Unblock regional restrictions for NeteaseCloudMusic on macOS/Linux. 网易云音乐macOS/Linux解除歌曲锁区限制。
The Unlicense
398 stars 40 forks source link

Automatic Proxy Configuration 和 macOS 同时使用WiFi和Wire的问题 #19

Open PeiyuanQi opened 5 years ago

PeiyuanQi commented 5 years ago

在macOS同时有多个interface来链接网络的时候,Helper只会设置一个的Automatic Proxy Configuration,导致无法使用代理。 手动全部配置后,问题解决。

yi-ji commented 5 years ago

感谢反馈!这种情况,确实没考虑到。。 因为条件限制不方便测试,如果能帮忙修改一下helper提个PR的话就最好了!

PeiyuanQi commented 5 years ago

噢好 我先来看下脚本是干了什么

PeiyuanQi commented 5 years ago

话说我不知道是不是我的macOS版本问题,提供的可执行脚本并不会获得权限来进行代理,必须要使用python3 Net....helper.py来运行。

yi-ji commented 5 years ago

没有权限How?什么输出? 再试试chmod +x NeteaseMusicHelper

PeiyuanQi commented 5 years ago

额 解决了,还是我忘了手动改我的Automatic Proxy Configuration导致的=-=

PeiyuanQi commented 5 years ago

话说产生了新的问题=-=

2018-11-22 21:31:34-0800 [NeteaseMusicProxyClient,client] Unhandled Error
    Traceback (most recent call last):
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/python/log.py", line 103, in callWithLogger
        return callWithContext({"system": lp}, func, *args, **kw)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/python/log.py", line 86, in callWithContext
        return context.call({ILogContext: newCtx}, func, *args, **kw)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/python/context.py", line 122, in callWithContext
        return self.currentContext().callWithContext(ctx, func, *args, **kw)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/python/context.py", line 85, in callWithContext
        return func(*args,**kw)
    --- <exception caught here> ---
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
        why = getattr(selectable, method)()
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/internet/tcp.py", line 243, in doRead
        return self._dataReceived(data)
      File "~i/Library/Python/3.7/lib/python/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
        rval = self.protocol.dataReceived(data)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/protocols/basic.py", line 579, in dataReceived
        why = self.rawDataReceived(data)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/web/http.py", line 642, in rawDataReceived
        self.handleResponsePart(data)
      File "NeteaseMusicProxy.py", line 140, in handleResponsePart
        proxy.ProxyClient.handleResponsePart(self, buffer)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/web/proxy.py", line 77, in handleResponsePart
        self.father.write(buffer)
      File "~/Library/Python/3.7/lib/python/site-packages/twisted/web/http.py", line 1122, in write
        self.channel.writeHeaders(version, code, reason, headers)
    builtins.AttributeError: 'NoneType' object has no attribute 'writeHeaders'
yi-ji commented 5 years ago

你修改哪里了嘛?请说明一下要如何复现这个情况?

PeiyuanQi commented 5 years ago

你修改哪里了嘛?请说明一下要如何复现这个情况?

还没修改任何地方=-= 我感觉可能和我这边网络状况会有关系,先让我换个地方试一试

PeiyuanQi commented 5 years ago

换了环境还是同样的问题,目前我始终是有package的None Type object的no attribute error,并不知道怎么复现了=-=

yi-ji commented 5 years ago

现在的环境是?

PeiyuanQi commented 5 years ago

macOS Mojave, pip3:

Package              Version
-------------------- ---------
asn1crypto           0.24.0
attrs                18.2.0
Automat              0.7.0
certifi              2018.8.24
cffi                 1.11.5
chardet              3.0.4
Click                7.0
constantly           15.1.0
cryptography         2.3.1
cssselect            1.0.3
dash                 0.28.2
dash-core-components 0.33.0
dash-html-components 0.13.2
dash-renderer        0.14.1
decorator            4.3.0
Flask                1.0.2
Flask-Compress       1.4.0
hyperlink            18.0.0
idna                 2.7
incremental          17.5.0
ipython-genutils     0.2.0
itsdangerous         0.24
Jinja2               2.10
jsonschema           2.6.0
jupyter-core         4.4.0
kaggle               1.4.7.1
lxml                 4.2.5
MarkupSafe           1.0
nbformat             4.4.0
numpy                1.15.3
pandas               0.23.4
pip                  18.1
plotly               3.3.0
pycparser            2.19
PyHamcrest           1.9.0
PyMySQL              0.9.2
pyquery              1.4.0
pyserial             3.4
python-dateutil      2.7.3
python-slugify       1.2.6
pytz                 2018.5
requests             2.19.1
retrying             1.3.3
scipy                1.1.0
setuptools           40.4.3
six                  1.11.0
style                1.1.0
tqdm                 4.26.0
traitlets            4.3.2
Twisted              18.9.0
Unidecode            1.0.22
update               0.0.1
urllib3              1.23
Werkzeug             0.14.1
wheel                0.32.1
zhconv               1.4.0
zope.interface       4.6.0

报错是对Twisted的包报的

yi-ji commented 5 years ago

网络环境以及网易云音乐版本呢? 试试python 2?