AssertionError: Session must be open

Hello Refinitiv Dev,
We can not access data through refinitiv-data-library-for-python from our hosted TREP solution (ADS), as we get the following error: AssertionError: Session must be open
Can someone please check if there are any issues with our session. I have generated the app key online as per the documentation and used provided samples. Please refer to attached full logs and script used.
Thanks,
Ivan
Console Log:
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
= RESTART: C:\Users\iriakhov\Desktop\refinitiv_python\Example.DataLibrary.Python-main\Quick Start\session.py
[2022-01-19 09:35:57,343] - [DEBUG] - [rd] - [19324] | MainThread
RD version is 1.0.0b6; Python version is 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)]
[2022-01-19 09:35:58,681] - [DEBUG] - [rd] - [19324] | MainThread
Installed packages (47): anyio==3.5.0,appdirs==1.4.4,asgiref==3.2.10,certifi==2020.6.20,chardet==3.0.4,charset-normalizer==2.0.10,decorator==5.1.1,defusedxml==0.6.0,diff-match-patch==20200713,django-import-export==2.3.0,django==3.1,et-xmlfile==1.0.1,eventemitter==0.2.0,h11==0.12.0,httpcore==0.14.4,httpx==0.21.3,idna==2.10,jdcal==1.4.1,markuppy==1.14,mysql-connector-python==8.0.27,nest-asyncio==1.5.1,numpy==1.22.1,odfpy==1.4.1,openpyxl==3.0.4,pandas==1.3.5,pip==21.3.1,protobuf==3.19.3,python-configuration==0.8.2,python-dateutil==2.8.2,pytz==2020.1,pyyaml==5.3.1,refinitiv-data==1.0.0b6,requests==2.27.1,rfc3986==1.5.0,scipy==1.7.3,setuptools==47.1.0,six==1.16.0,sniffio==1.2.0,sqlparse==0.3.1,tablib==2.0.0,tenacity==8.0.1,urllib3==1.26.8,validators==0.18.2,watchdog==2.1.6,websocket-client==1.2.3,xlrd==1.2.0,xlwt==1.3.0
[2022-01-19 09:35:58,709] - [DEBUG] - [rd] - [19324] | MainThread
Read configs: ../Configuration\refinitiv-data.config.json, C:\Users\iriakhov\Desktop\refinitiv_python\Example.DataLibrary.Python-main\Quick Start\refinitiv-data.config.json, C:\Users\iriakhov\refinitiv-data.config.json, C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\refinitiv-data.config.json
[2022-01-19 09:35:59,640] - [DEBUG] - [session] - [19324] | MainThread
Creating session "sessions.platform.deployed.0" based on session.platform.Definition("platform.deployed")
[2022-01-19 09:35:59,876] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
+ Session created PlatformSession {
name=deployed,
server_mode=False,
stream_auto_reconnection=True,
signon_control=True,
authentication_token_endpoint_url=https://api.refinitiv.com/auth/oauth2/v1/token}
[2022-01-19 09:36:00,175] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
Created session connection SessionCxnType.DEPLOYED
[2022-01-19 09:36:00,243] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
[StreamingPrices id=0 universe=['CAD=']] is opening [o]
[2022-01-19 09:36:00,288] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
[StreamingPrices id=0 universe=['CAD=']] open streaming on ['CAD=']
[2022-01-19 09:36:00,306] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
[StreamingPrice id=0.0 name='CAD='] is opening [o]
[2022-01-19 09:36:00,309] - [DEBUG] - [rd.stream-factory] - [19324] | MainThread
+ Created stream=[_OMMStream id=1]
[2022-01-19 09:36:00,325] - [DEBUG] - [sessions.platform.deployed.0] - [19324] | MainThread
[StreamingPrice id=0.0 name='CAD='] Open async 1 to CAD=
Traceback (most recent call last):
File "C:\Users\iriakhov\Desktop\refinitiv_python\Example.DataLibrary.Python-main\Quick Start\session.py", line 14, in <module>
non_streaming.open(with_updates=False)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\pricing\stream.py", line 104, in open
state = self._stream.open(with_updates=with_updates)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\delivery\stream\stream_state_manager.py", line 77, in open
return self._loop.run_until_complete(self.open_async(*args, **kwargs))
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\nest_asyncio.py", line 70, in run_until_complete
return f.result()
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\asyncio\futures.py", line 178, in result
raise self._exception
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\asyncio\tasks.py", line 280, in __step
result = coro.send(None)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\delivery\stream\stream_state_manager.py", line 87, in open_async
await self._do_open_async(*args, **kwargs)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\content\streaming\streamingprices.py", line 318, in _do_open_async
await stream_opens_socket.open_async(*args, with_updates=with_updates)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\delivery\stream\stream_state_manager.py", line 87, in open_async
await self._do_open_async(*args, **kwargs)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\content\streaming\streamingprice.py", line 154, in _do_open_async
await self._stream.open_async(*args, with_updates=with_updates)
File "C:\Users\iriakhov\AppData\Local\Programs\Python\Python38-32\lib\site-packages\refinitiv\data\_data\delivery\stream\stream.py", line 74, in open_async
raise AssertionError("Session must be open")
AssertionError: Session must be openrefinitiv-data.config.json.txtsession.py - Copy.txt
Best Answer
-
An issue with RD Python Library Deployed session has been reported and confirmed by the RD Python library team.
The fix is scheduled for early February.
As you are aware the RD Python library is in the Beta phase.
I will check if there is any workaround for creating a Deployed session and update you.
0
Answers
-
The RD Python library team confirmed there is no workaround for a Deployed session with the b6 build.
An internal b7 release is due this Friday, which should be available to customers sometime afterwards. I will update you once I know.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛