我正在尝试使用appengine下载一些图像来创建文档。
这是我收到错误的行:
image_from_url = urllib2.urlopen(req)
这是在推送队列(延迟)的任务中发生的。
我收到了这个错误:
ERROR 2016-07-26 12:34:05,388 base.py:214] descriptor '__dict__' for '_OxmlElementBase' objects doesn't apply to 'CT_R' object
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/Users/ariana/Desktop/SNC/illist/illistsite/handlers/base.py", line 36, in check_login
return handler(self, *args, **kwargs)
File "/Users/ariana/Desktop/SNC/illist/illistsite/handlers/docx_export.py", line 18, in get
gcs_make_and_store_doc(self, data)
File "/Users/ariana/Desktop/SNC/illist/illistsite/handlers/gcs_make_and_store.py", line 15, in gcs_make_and_store_doc
store(self, make_doc(data))
File "/Users/ariana/Desktop/SNC/illist/illistsite/handlers/gcs_make_and_store.py", line 144, in make_doc
draw_logo(logo_run, company)
File "/Users/ariana/Desktop/SNC/illist/illistsite/handlers/gcs_make_and_store.py", line 108, in draw_logo
image_from_url = urllib2.urlopen(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1202, in do_open
r = h.getresponse()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/dist27/gae_override/httplib.py", line 522, in getresponse
**extra_kwargs)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/urlfetch.py", line 270, in fetch
allow_truncated, follow_redirects, validate_certificate)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/urlfetch.py", line 347, in make_fetch_call
rpc.make_call('Fetch', request, response, _get_fetch_result, allow_truncated)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 528, in make_call
self.__service, method, request, response, self.__rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 206, in Call
function(service, call, request, response, rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 1441, in pre_call_hook
recorder_proxy.record_rpc_request(service, call, request, response, rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 566, in record_rpc_request
self.get_call_stack(trace)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 879, in get_call_stack
if not self.get_frame_summary(frame, trace):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 937, in get_frame_summary
x.set_value(format_value(value))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 995, in format_value
return formatting._format_value(val, config.MAX_REPR, config.MAX_DEPTH)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/formatting.py", line 250, in _format_value
rep = _format_value(dct[nam], limit, level-1)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/formatting.py", line 203, in _format_value
dct = getattr(val, '__dict__', None)
TypeError: descriptor '__dict__' for '_OxmlElementBase' objects doesn't apply to 'CT_R' object
当我禁用appstats时,它工作正常,但由于某些原因,appstats正在崩溃它。对问题可能有什么建议或想法?我已经搜索了错误,并没有找到任何类似的东西。谢谢!