AttributeError: 'NoneType' object has no attribute 'head'

Running scripts
2024-03-13 16:44:55,998 P[33204] [MainThread 648] Init a Desktop session with new app_key
2024-03-13 16:44:55,999 P[33204] [MainThread 648] entity: DataGrid_StandardAsync
2024-03-13 16:44:55,999 P[33204] [MainThread 648] payload: {'requests': [{'instruments': ['0#.SPX'], 'fields': [{'name': 'TR.CommonName'}, {'name': 'TR.IssuerRating(IssuerRatingSrc=SPI)'}, {'name': 'TR.IssuerRating(IssuerRatingSrc=SPI,Sdate=-10Y)'}]}]}
2024-03-13 16:44:56,000 P[33204] [MainThread 648] Request:{'Entity': {'E': 'DataGrid_StandardAsync', 'W': {'requests': [{'instruments': ['0#.SPX'], 'fields': [{'name': 'TR.CommonName'}, {'name': 'TR.IssuerRating(IssuerRatingSrc=SPI)'}, {'name': 'TR.IssuerRating(IssuerRatingSrc=SPI,Sdate=-10Y)'}]}]} } }
2024-03-13 16:44:56,000 P[33204] [MainThread 648] Request to http://127.0.0.1:9060/api/v1/data
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'a8366afe8718413e8ddcdf5208ecfa49a4e65d37', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBcGlWZXJzaW9uIjoiMSIsIkFwcEtleSI6ImE4MzY2YWZlODcxODQxM2U4ZGRjZGY1MjA4ZWNmYTQ5YTRlNjVkMzciLCJBcHBTY29wZSI6InRyYXBpIiwiTGlicmFyeU5hbWUiOiJSRFAgUHl0aG9uIExpYnJhcnkiLCJMaWJyYXJ5VmVyc2lvbiI6IjEuMS4xOCIsImlhdCI6MTcxMDM0NDY5NSwiZXhwIjoxNzExNTU0Mjk1fQ.vMShAhHAw8BV090ZnveaTlL83WtoVmC3undu73wipIA'}
params = None
2024-03-13 16:44:56,300 P[33204] [MainThread 648] Send request with headers [(b'Host', b'127.0.0.1:9060'), (b'Accept-Encoding', b'gzip, deflate'), (b'Connection', b'keep-alive'), (b'User-Agent', b'python-httpx/0.24.1'), (b'Accept', b'application/json'), (b'Content-Type', b'application/json'), (b'x-tr-applicationid', b'a8366afe8718413e8ddcdf5208ecfa49a4e65d37'), (b'Authorization', b'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBcGlWZXJzaW9uIjoiMSIsIkFwcEtleSI6ImE4MzY2YWZlODcxODQxM2U4ZGRjZGY1MjA4ZWNmYTQ5YTRlNjVkMzciLCJBcHBTY29wZSI6InRyYXBpIiwiTGlicmFyeU5hbWUiOiJSRFAgUHl0aG9uIExpYnJhcnkiLCJMaWJyYXJ5VmVyc2lvbiI6IjEuMS4xOCIsImlhdCI6MTcxMDM0NDY5NSwiZXhwIjoxNzExNTU0Mjk1fQ.vMShAhHAw8BV090ZnveaTlL83WtoVmC3undu73wipIA'), (b'Content-Length', b'243')] and cookies None
2024-03-13 16:44:56,301 P[33204] [MainThread 648] HTTP request response 200: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/html4/strict.dtd><html><head><title>Sign In</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/><meta http-equiv="content-type" content="text/html; charset=utf-8"/><META page=login><link rel="icon" type="image/vnd.microsoft.icon" href="/auth/images/favicon.png"/><link rel="shortcut icon" href="/auth/images/favicon.png"/><link rel="stylesheet" type="text/css" href="/auth/css/charcoal_commonstyles_spr.css?v=_2.5.2392.01"/><link rel="stylesheet" type="text/css" href="/auth/css/refinitiv_charcoal_loginstyles_spr.css?v=_2.5.2392.01"/><script type="text/javascript" src="/auth/js/signin_spr.js?v=_2.5.2392.01"></script><script type="text/javascript" src="/js/as.js?v=_2.5.2392.01"></script><script src="/auth/js/jquery-1.10.1.min.js"></script><script src="/auth/js/jquery-as.js?v=_2.5.2392.01"></script><script type='text/javascript'>function openHelpLink(){var …
But getting
Traceback (most recent call last):
File "test_ratings_data.py", line 13, in <module>
ratings_data.head()
AttributeError: 'NoneType' object has no attribute 'head'
Answers
-
Thank you for reaching out to us.
From the log, the API got the 200 HTTP response that contains HTML.
2024-03-13 16:44:56,301 P[33204] [MainThread 648] HTTP request response 200: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/html4/strict.dtd><html><head><title>Sign In</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/><meta http-equiv="content-type" content="text/html; charset=utf-8"/><META page=login><link rel="icon" type="image/vnd.microsoft.icon" href="/auth/images/favicon.png"/><link rel="shortcut icon" href="/auth/images/favicon.png"/><link rel="stylesheet" type="text/css" href="/auth/css/charcoal_commonstyles_spr.css?v=_2.5.2392.01"/><link rel="stylesheet" type="text/css" href="/auth/css/refinitiv_charcoal_loginstyles_spr.css?v=_2.5.2392.01"/><script type="text/javascript" src="/auth/js/signin_spr.js?v=_2.5.2392.01"></script><script type="text/javascript" src="/js/as.js?v=_2.5.2392.01"></script><script src="/auth/js/jquery-1.10.1.min.js"></script><script src="/auth/js/jquery-as.js?v=_2.5.2392.01"></script><script type='text/javascript'>function openHelpLink(){var …
The title of the HTML is Sign In.
The cause of this issue could be the account may be used on another machine, as mentioned on this disussion. Please make sure that the account is not used on another machine.
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
- 652 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 中文论坛