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

Upvote
Accepted
46 1 1 3

spyder 5.1.5 error,eikon data api

on import eikon i m getting this


[SpyderKernelApp] ERROR | Exception in message handler:

Traceback (most recent call last):

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 164, in poll_one

asyncio.run(handler(out_stream, ident, msg))

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\nest_asyncio.py", line 32, in run

return loop.run_until_complete(future)

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\nest_asyncio.py", line 60, in run_until_complete

f = asyncio.ensure_future(future, loop=self)

File "C:\Users\adamk.ALPHA\Anaconda3\lib\asyncio\tasks.py", line 680, in ensure_future

raise TypeError('An asyncio.Future, a coroutine or an awaitable is '

TypeError: An asyncio.Future, a coroutine or an awaitable is required

[SpyderKernelApp] ERROR | Exception in message handler:

Traceback (most recent call last):

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 164, in poll_one

asyncio.run(handler(out_stream, ident, msg))

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\nest_asyncio.py", line 32, in run

return loop.run_until_complete(future)

File "C:\Users\adamk.ALPHA\Anaconda3\lib\site-packages\nest_asyncio.py", line 60, in run_until_complete

f = asyncio.ensure_future(future, loop=self)

File "C:\Users\adamk.ALPHA\Anaconda3\lib\asyncio\tasks.py", line 680, in ensure_future

raise TypeError('An asyncio.Future, a coroutine or an awaitable is '

TypeError: An asyncio.Future, a coroutine or an awaitable is required


using eikon 1.1.14, spyder 5.1.15, windows

any ideas?

eikon-data-apipythonerrorasynchronousspyder
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.

@k.adam

Please share the code or cut down version of code that you are using.

I didn't see the eikon library in the error.

code;

import eikon as ek


I face exactly the same problem. With Anaconda, I cannot upgrade to Spyder 5.2.1. and it makes the use of eikon virtually unacceptable.


Does Bloomberg has the same issues ?

@k.adam

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi @k.adam ,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.


Thanks,

AHS

Upvotes
Accepted
24.7k 54 17 14

Hello @k.adam

Have you tested the issue with the newer version of the Spyder IDE yet? I have tested with Spyder 5.2.1 and it works fine with the nest_asyncio and Eikon Data API call.

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.

thanks for the reply

not yet

i m using anaconda and it will not upgrade from 5.1.5 to 5.2.1



We also have that problem. On one computer I managed to install spyder 5.2.1 via conda command line, while on another - I did not.

yes

its so convenient

workaround for me at this point is another IDE alltogether

and problem solved once and for all

With 5.2.1 everything works.
Upvote
79.1k 250 52 74

@k.adam

I can replicate this issue with spyder 5.1.5.

I am not sure if it is a problem in Spyder or Eikon Data API because the same exception happens when running the below code.

import nest_asyncio
nest_asyncio.apply()
[SpyderKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "C:\Users\U8009686\Anaconda3\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 165, in poll_one
    asyncio.run(handler(out_stream, ident, msg))
  File "C:\Users\U8009686\Anaconda3\lib\site-packages\nest_asyncio.py", line 36, in run
    task = asyncio.ensure_future(main)
  File "C:\Users\U8009686\Anaconda3\lib\asyncio\tasks.py", line 680, in ensure_future
    raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
TypeError: An asyncio.Future, a coroutine or an awaitable is required


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.

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.