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?
Best Answer
-
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.
I also tested the code in this first post, version 1.0.0b9 also works fine too.
0
Answers
-
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.
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
0 -
@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.
0 -
Then I tried the code in this https://community.developers.refinitiv.com/questions/95879/why-do-i-face-with-the-following-error-nat-not-fou.html post with version 1.0.0b9.
I cannot replicate the same issues with refinitiv-data version 1.0.0b9.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 650 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛