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
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛