'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')
Solution 1:[1]
You might wanna use object id in GridFs. fs.get_last_version('_id': (your variable for object id))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Arish Bhayani |
