请问,下载sinaweibopy源码,在Eclipse工程中打开有第102行代码有问题出现错误。错误内容:”Undefined variable from import: types_map“,请问是怎么回事?
def _guess_content_type(url):
n = url.rfind('.')
if n==(-1):
return 'application/octet-stream'
ext = url[n:]
return mimetypes.types_map.get(ext, 'application/octet-stream')
Sign in to make a reply
尼是猴子搬来的救兵吗
请问,下载sinaweibopy源码,在Eclipse工程中打开有第102行代码有问题出现错误。错误内容:”Undefined variable from import: types_map“,请问是怎么回事?
def _guess_content_type(url):
n = url.rfind('.')
if n==(-1):
return 'application/octet-stream'
ext = url[n:]
return mimetypes.types_map.get(ext, 'application/octet-stream')