ly0 / baidupcsapi

百度网盘api
MIT License
1.21k stars 234 forks source link

登陆的时候出现问题. No such file or directory: 'gvfs-open': 'gvfs-open' #78

Closed jarrahwu closed 6 years ago

jarrahwu commented 6 years ago

环境是ubuntu 16.04.1 LTS 64位 服务器

就调用了示例代码: from baidupcsapi import PCS pcs = PCS('user', 'pwd')

/tmp/tmptmn1lwpy.png Traceback (most recent call last): File "", line 1, in File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 501, in init verify_func=verify_callback) File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 169, in init self._initiate() File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 228, in _initiate self._login() File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 320, in _login captcha = self._get_captcha(code_string) File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 265, in _get_captcha "https://passport.baidu.com/cgi-bin/genimage?" + code_string.decode('utf-8')) File "/anaconda3/lib/python3.6/site-packages/baidupcsapi/api.py", line 60, in default_captcha_handler subprocess.call(['gvfs-open', filename]) File "/anaconda3/lib/python3.6/subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "/anaconda3/lib/python3.6/subprocess.py", line 709, in init restore_signals, start_new_session) File "/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'gvfs-open': 'gvfs-open'

备注一下: 在本地 mac os 是可以的. 服务器部署不了有点纳闷了

jarrahwu commented 6 years ago

看了下源码...已解决: sudo apt install gvfs-bin ... 但是有没有不需要输入验证码的方法呢