![](/img/trans.png)
[英]In python module troposphere I am getting an error “AttributeError: 'module' object has no attribute 'EBSBlockDeviceMapping'”
[英]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.