繁体   English   中英

模块“gridfs”没有属性“get”我在 python 中收到此错误

[英]module 'gridfs' has no attribute 'get' I am getting this error in python

item = db.WineImages.find_one({'id': id})

 image = grid_fs.get(item['id'])

base64_data = codecs.encode(image.read(), 'base64')

image = base64_data.decode('utf-8')

您可能想在 GridFs 中使用 object id。 fs.get_last_version('_id': (你的变量 object id))

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM