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]