question

Upvotes
Accepted
54 3 5 14

Why do I face with the memory error?

Here is the code:

rd.open_session()

data = rd.get_history(universe=['4295856055', '4295856249', '4295856359', '4295856557', '4295857081'],

fields=['TR.F.EPSDilExclExordItemsNormTot(Period=LTM)'],

interval='1D', start='2005-01-01', end='2022-04-20')

rd.close_session()


When I launch it in Jupyter Notebook, it shows the following error:

MemoryError: Unable to allocate 26.7 GiB for an array with shape (3587076645,) and data type int64


I am sure that 26.7 GiB is more than this dataset produces.


How can I resolve this issue?

eikon-data-apipython apirefinitiv-data-platform-libraries
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
28k 68 18 14

Hello @alekseenkova.marina

Sorry for the late reply. I checked the https://community.developers.refinitiv.com/questions/93467/how-coud-i-retrieve-nda-rawnda-date-and-nda-rawnda.html post and I found the RD-Library expert suggested you test with the refinitiv-data version 1.0.0b9.

I tried this issue with the suggested version 1.0.0b9, and the code works fine on my side.

request-1.png

I also tested the code in this first post, version 1.0.0b9 also works fine too.

request-2.png




request-1.png (35.7 KiB)
request-2.png (34.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
28k 68 18 14

Hello @alekseenkova.marina

I can replicate the issue with the given code and the refinitiv-data library version 1.0.0b13. However, once I updated the library to the latest version (1.0.0b16 - as of July 2022), the code works fine.

ahs-95875.png

What is the version of the refinitiv-data library in your environment? You can check with the following command:

pip show refinitiv-data

You can upgrade the library with the following command:

pip install refinitiv-data --upgrade

ahs-95875.png (43.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@wasin.w, I cannot upgrade the version because the newest one produces errors. Please read the thread here: https://community.developers.refinitiv.com/questions/93467/how-coud-i-retrieve-nda-rawnda-date-and-nda-rawnda.html Your colleague advised me to downdgrade it.

Upvotes
28k 68 18 14

request-3.png (29.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.