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
• 7,870 points
22 views

1 answer to this question.

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
• 13,160 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
1,647 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
36 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
29 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
7,358 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 216 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
• 13,160 points
192 views
0 votes
1 answer