我正在尝试从Algorithmia运行 Auto-Tag ,主要尝试使用cURL
and Pyhton
,并得到一个错误,指出:
卷曲
{"error":{"message":"authorization required"}}
Python
Last login: Mon Jul 6 20:27:54 on ttys000
cd '/Users/abc/Desktop/' && '/usr/bin/pythonw' '/Users/abc/Desktop/autoTag.py' && echo Exit status: $? && exit 1
abc-MacBook-Pro:~ abc$ cd '/Users/abc/Desktop/' && '/usr/bin/pythonw' '/Users/abc/Desktop/autoTag.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/abc/Desktop/autoTag.py", line 6, in <module>
response = urllib2.urlopen(request, json.dumps(input))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 401: Unauthorized
我究竟做错了什么?
谢谢。