Eikon API: AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'
Hi,
We're trying to get user started with Eikon Data API in Pycharm, but are getting the following error: AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'.
Eikon package has been installed succesfully and this is the error we're getting when trying to run the first bit of code.
How to get up and running?
--------------------------------------
Code:
import eikon as ek
ek.set_app_key('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
df, err = ek.get_data(
instruments = ['NOKIA.HE'],
fields = ['TR.PriceClose'],
parameters={'Sdate':'2020-10-05'}
)
display(df)
-----------------------------
runfile('K:/Scriptit/untitled1.py', wdir='K:/Scriptit')
Traceback (most recent call last):
File "<ipython-input-5-e7c8c82f5d07>", line 1, in <module>
runfile('K:/Scriptit/untitled1.py', wdir='K:/Scriptit')
File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "K:/Scriptit/untitled1.py", line 8, in <module>
import eikon as ek
File "C:\PR\Anaconda3\lib\site-packages\eikon\__init__.py", line 12, in <module>
from .Profile import *
File "C:\PR\Anaconda3\lib\site-packages\eikon\Profile.py", line 17, in <module>
from .streaming_session import DesktopSession
File "C:\PR\Anaconda3\lib\site-packages\eikon\streaming_session\__init__.py", line 3, in <module>
from .session import *
File "C:\PR\Anaconda3\lib\site-packages\eikon\streaming_session\session.py", line 8, in <module>
import httpx
File "C:\PR\Anaconda3\lib\site-packages\httpx\__init__.py", line 2, in <module>
from ._api import delete, get, head, options, patch, post, put, request, stream
File "C:\PR\Anaconda3\lib\site-packages\httpx\_api.py", line 4, in <module>
from ._client import Client, StreamContextManager
File "C:\PR\Anaconda3\lib\site-packages\httpx\_client.py", line 25, in <module>
from ._dispatch.connection_pool import ConnectionPool
File "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\connection_pool.py", line 16, in <module>
from .connection import HTTPConnection
File "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\connection.py", line 11, in <module>
from .http2 import HTTP2Connection
File "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\http2.py", line 3, in <module>
import h2.connection
File "C:\PR\Anaconda3\lib\site-packages\h2\connection.py", line 23, in <module>
from .events import (
File "C:\PR\Anaconda3\lib\site-packages\h2\events.py", line 14, in <module>
from .settings import ChangedSetting, _setting_code_from_int
File "C:\PR\Anaconda3\lib\site-packages\h2\settings.py", line 20, in <module>
class SettingCodes(enum.IntEnum):
File "C:\PR\Anaconda3\lib\site-packages\h2\settings.py", line 55, in SettingCodes
ENABLE_CONNECT_PROTOCOL = SettingsFrame.ENABLE_CONNECT_PROTOCOL
AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'
Answers
-
Hello @mikael.lehto,
To me, this does not look familiar among common issues. I see what appears to be the same issue described in this GitHub discussion, I would give this recommendation a try first.
If this does not help, next, I would suggest to verify your installation of EDAPI by reviewing and following Eikon Data API(Python) Troubleshooting | Refinitiv.
Let us know how this works.
Thanks
0 -
Hi,
Could you check dependecy version with 'pip list' command and share the result ?
According to the traceback, httpx ssems to be in a wrong version: it should be 0.14.*
(you can force the right version with 'pip install httpx==0.14.3' command)0 -
Thank you Zoya and Pierre! We're checking this with the user and will revert still if it doesn't work.
0 -
Hello,
I have now updated httpx to 0.14.3 and h2 to 4.0.0.Eikon API version 1.1.7
Desktop version:
Unable to get the log file from the troubleshooting guide..... But other steps ok, up until execution of code.
Still getting the same error.
Any workarounds?Thanks.
0 -
If the error is:
ENABLE_CONNECT_PROTOCOL = SettingsFrame.ENABLE_CONNECT_PROTOCOL
AttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'You need to verify the version of hyperframe library.
The hyperframe should be 5.2 or above which contains ENABLE_CONNECT_PROTOCOL.
#: The byte that signals SETTINGS_ENABLE_CONNECT_PROTOCOL setting.
ENABLE_CONNECT_PROTOCOL = 0x080 -
Hello,
I am actually the one with the problem (not Mikael), and I have now checked that I have hyperframe version 5.2.0. Still does not work.
Please advise.0 -
Can you share the full error message?
0 -
Here you go:
Traceback (most recent call last):File "<ipython-input-14-c358c9483937>", line 1, in <module>
runfile('C:/Users/B716548/OneDrive - OP/Scriptit/untitled0.py', wdir='C:/Users/B716548/OneDrive - OP/Scriptit')File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)File "C:/Users/B716548/OneDrive - OP/Scriptit/untitled0.py", line 1, in <module>
import eikon as ekFile "C:\PR\Anaconda3\lib\site-packages\eikon\__init__.py", line 12, in <module>
from .Profile import *File "C:\PR\Anaconda3\lib\site-packages\eikon\Profile.py", line 17, in <module>
from .streaming_session import DesktopSessionFile "C:\PR\Anaconda3\lib\site-packages\eikon\streaming_session\__init__.py", line 3, in <module>
from .session import *File "C:\PR\Anaconda3\lib\site-packages\eikon\streaming_session\session.py", line 8, in <module>
import httpxFile "C:\PR\Anaconda3\lib\site-packages\httpx\__init__.py", line 2, in <module>
from ._api import delete, get, head, options, patch, post, put, request, streamFile "C:\PR\Anaconda3\lib\site-packages\httpx\_api.py", line 4, in <module>
from ._client import Client, StreamContextManagerFile "C:\PR\Anaconda3\lib\site-packages\httpx\_client.py", line 25, in <module>
from ._dispatch.connection_pool import ConnectionPoolFile "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\connection_pool.py", line 16, in <module>
from .connection import HTTPConnectionFile "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\connection.py", line 11, in <module>
from .http2 import HTTP2ConnectionFile "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\http2.py", line 3, in <module>
import h2.connectionFile "C:\PR\Anaconda3\lib\site-packages\h2\connection.py", line 23, in <module>
from .events import (File "C:\PR\Anaconda3\lib\site-packages\h2\events.py", line 14, in <module>
from .settings import ChangedSetting, _setting_code_from_intFile "C:\PR\Anaconda3\lib\site-packages\h2\settings.py", line 20, in <module>
class SettingCodes(enum.IntEnum):File "C:\PR\Anaconda3\lib\site-packages\h2\settings.py", line 55, in SettingCodes
ENABLE_CONNECT_PROTOCOL = SettingsFrame.ENABLE_CONNECT_PROTOCOLAttributeError: type object 'SettingsFrame' has no attribute 'ENABLE_CONNECT_PROTOCOL'
0 -
From the call stack:
File "C:\PR\Anaconda3\lib\site-packages\httpx\_dispatch\connection_pool.py", line 16, in <module>from .connection import HTTPConnection
I have checked the source code of httpx 0.14.3 and found that it doesn't have httpx\_dispatch folder.
I found httpx\_dispatch folder in the httpx-0.12.1.
Please check the version again in this directory (C:\PR\Anaconda3\lib\site-packages).
0 -
Please let us know if we have any updates on this issue.
0 -
Hello,
Thanks, I have got through that problem now, but I am having a new one as below:Any help?
1.1.7
2020-11-06 16:27:12,277 P[8664] [MainThread 2488] Error on handshake port 9060 : TimeoutException("TimeoutException on HTTP request: ReadTimeout('')")
2020-11-06 16:27:33,338 P[8664] [MainThread 2488] Error code 500 | Server Error: {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
2020-11-06 16:27:33,342 P[8664] [MainThread 2488] HTTP request failed: EikonError-Server Error: {"code":500,"message":"connect ETIMEDOUT 159.220.1.19:443","statusMessage":"Internal Server Error"}
Traceback (most recent call last):File "<ipython-input-6-c358c9483937>", line 1, in <module>
runfile('C:/Users/B716548/OneDrive - OP/Scriptit/untitled0.py', wdir='C:/Users/B716548/OneDrive - OP/Scriptit')File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)File "C:\PR\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)File "C:/Users/B716548/OneDrive - OP/Scriptit/untitled0.py", line 10, in <module>
parameters = {'SDate':'2020-10-05'}File "C:\PR\Anaconda3\lib\site-packages\eikon\data_grid.py", line 192, in get_data
if result.get('responses'):AttributeError: 'NoneType' object has no attribute 'get'
0 -
Are you still experiencing this problem? The error message appears to be generated by Refinitiv backend. If the problem persists, I suggest you raise it to Refinitiv Helpdesk. The Helpdesk can be reached by using Contact Us capability in your Eikon application or by visiting MyRefinitiv. We would very much appreciate if you could update this thread with the latest status of the issue. Thank you.
0 -
It appears that a simple:
conda install h2==3.2.0
fixed the problem. For some reason it really wasn't liking h2 v4.0.0
0 -
I think you posted this comment on the wrong thread. Did you mean to post it here? If yes, could you please update the right thread? Thank you.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛