簡體   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