AttributeError:'模块'对象没有属性' GridFS'

时间:2015-01-30 08:20:41

标签: python mongodb pymongo gridfs

import pymongo
import gridfs
conn=pymongo.Connection()
db=conn.gridfs_testing
fs=gridfs.GridFS(db)
fs.list()
fs.put(open('/home/sairam_siripuram/Desktop/nba_data/01 - Intro.mp4','r'),filename='01 - Intro')

在上面的代码我试图使用gridfs将mp4文件存储到mongodb但是它给我发了以下错误

导入错误:

Error:

 fs=gridfs.GridFS(db)
 AttributeError: 'module' object has no attribute 'GridFS'
 [Finished in 0.1s with exit code 1]

0 个答案:

没有答案