suyan / scripts

some script files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为什么我用这个插件不能上传啦?

victoryxs opened this issue · comments

以前还是可以上传的,现在却不能啦

@victoryxs 你用的中文名吗?这个有点问题,如果是这个问题,我会尽快修复

thanks,刚才理解错了,我以为是空间的名字,原来是上传图片的名字,万分感谢!

@victoryxs 我把这个问题修好提交了,迟些官方包应该会更新

thanks,我看了一下action.py,对于多个文件,只获取第一个文件的句柄,是不是考虑返回的外链的问题?

@victoryxs 是的,因为只能往剪切版放一个url,所以我写了只处理一个图片

同样不能上传

debug信息:

Traceback (most recent call last):
File "/Applications/Dropzone 3.app/Contents/Actions/lib/python_runner.py", line 13, in
getattr(action, action_name)()
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/action.py", line 80, in dragged
base_url = uploadFile(file_path, file_name)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/action.py", line 57, in uploadFile
ret, info = put_file(token, file_name, file_path)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/services/storage/uploader.py", line 54, in put_file
ret, info = _form_put(up_token, key, input_stream, params, mime_type, crc, progress_handler)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/services/storage/uploader.py", line 71, in _form_put
r, info = http._post_file(url, data=fields, files={'file': (name, data, mime_type)})
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/http.py", line 73, in _post_file
return _post(url, data, files, None)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/http.py", line 46, in _post
return __return_wrapper(r)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/http.py", line 23, in __return_wrapper
return None, ResponseInfo(resp)
File "/Users/zhishanzhang/Library/Application Support/Dropzone 3/Actions/Qiniu.dzbundle/qiniu/http.py", line 109, in init
ret = response.json() if response.text != '' else None
File "/Library/Python/2.7/site-packages/requests/models.py", line 826, in json
return complexjson.loads(self.text, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

@zhangzhishan 你这个问题我没有遇到过,看起来是发送请求的时候遇到的
你可以打印一下那个json返回,看看是什么原因

@suyan 返回的response.json()结果是 1

@zhangzhishan 你再看看配置项填的又没问题,我觉得这个可能和配置相关。

发现问题了,是系统代理的原因。把代理关了就可以了。