Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
1 0 0 0

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'







eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
4.3k 2 4 5

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)


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 0

Thank you Zoya and Pierre! We're checking this with the user and will revert still if it doesn't work.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 1

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.


1603443966050.png (3.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
77.5k 242 52 72

@mikael.lehto

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 = 0x08


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 0 1

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.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Julius.uotila

Can you share the full error message?

Upvotes
1 0 0 1

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 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'

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
77.5k 242 52 72

@Julius.uotila

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).


1604307583750.png (56.6 KiB)
1604307643732.png (16.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Julius.uotila

Please let us know if we have any updates on this issue.

Upvotes
1 0 0 1

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'

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Julius.uotila

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.

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


@michael-r.meyer

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.