MemoryError binary data storage

0 votes
I'm trying to to store about 350MB of binary data to peewee.BlobField but it is showing a MemoryError. I have no issues with smaller files like 250MB. How can I store 350MB?

This is how I am trying to store data:

Subproducts.create(cfg_id=config_id,
                   c=c,
                   mf=mf_data.getbuffer()
type(mf_data) is <class '_io.BytesIO'>

This is how my model looks like:

class Subproducts(BaseModel):

    cfg = peewee.ForeignKeyField(ConfigModel, related_name='cfg')
    c = peewee.TextField()
    mf = peewee.BlobField()

    class Meta:
        indexes = (
            (('cfg', 'c'), True),
        )
Dec 26, 2018 in Python by ana1504.k
• 5,870 points
13 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
The problem occurs when you are using 32bit Python but it is resolved with the help of 64bit Python.
answered Dec 26, 2018 by SDeb
• 9,300 points

Related Questions In Python

+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,700 points
480 views
0 votes
1 answer

Unique identification for data items in Python

Try the UUID module of Python. For example, ...READ MORE

answered Apr 17, 2018 in Python by Nietzsche's daemon
• 4,260 points
18 views
0 votes
1 answer

Need help with searching a binary search tree

Instead of multiplying the number of nodes ...READ MORE

answered Apr 17, 2018 in Python by anonymous
16 views
0 votes
2 answers

Extracting data from a JSON file in Python

Here is what i found and was ...READ MORE

answered Nov 27, 2018 in Python by Rupali
3,868 views
0 votes
1 answer

Binary numbers in python

>>> 0b1011 11 READ MORE

answered Jun 6, 2018 in Python by Hamartia's Mask
• 1,580 points
11 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 920 points
18 views
0 votes
1 answer

Read & write data in mifare card

Hi, you can check out the following ...READ MORE

answered Nov 29, 2018 in Python by SDeb
• 9,300 points
113 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.