When run ek.set_app_key(my api key) in spyder it doesnt work. The kernel stays busy and I cannot do anything. On the other hand the command works in my jupyter notbook. Does anyone know how to solve this?
Your help would be much appreciated. Thank you.
I assume the log file output is for when you run in Spyder? If so, the line Set App Key: None is troubling as this would indicate you are not providing an AppKey?
Your Anaconda screenshot confirms that from Anaconda prompt you are able to connect to Eikon and get a valid response. The key line is Port 9000 on local proxy was detected - which indicates a successful connection.
I have also spoken with the Eikon Data API development team and they can confirm they have never faced any issues when testing with Spyder.
This would seem to narrow this down to an issue with your particular Spyder installation. As Spyder is a 3rd party application the only suggestions I can offer are to try and uninstall and re-install Spyder to see if that helps.
Alternatively, you could use Spyder IDE as your editor to create/edit your script and then run the script from the Anaconda prompt - instead of from within Spyder. I appreciate this is not ideal - but this is a workaround I would consider using as a developer if I could not figure out what was wrong with my IDE.
Failing that there are other IDEs available such as Visual Studio Code.
Please advise what you mean by does not work?
Do you see any error message / other output?
Please try enabling logging to see if that provides any relevant information e.g.
import logging.config ek.set_log_level(logging.DEBUG) ek.set_app_key('<your app key>')
Just to confirm that I did try a quick test in Spyder and it worked fine.
Also, can you confirm what happens if you run a basic script with set_app_key in a Python console?
Thanks for the update.
And can you confirm what happens when you run the script in a standalone console outside of Spyder? e.g. at the Anaconda prompt and a standard Python console invoked directly from Windows (rather than from within Spyder)?
Also, please confirm the version of eikon library installed
import eikon as ek ek.__version__
You should also have a Log file generated in the working directory e.g. something like pyeikon.20200424.10-47-44.log - please remove any AppKey etc from the log file before attaching to your reply.
One final thing, have you tried completely shutting down the Eikon application instance and restarting it - we have had the odd occasion where the Eikon library refuses to connect and a restart fixes it. Note that exiting Eikon does not necessarily shut it down - you may have to use the little icons in the bottom left to shut it down completely.
I can run the latest version of eikon data API 1.1.2 with spyder.
I'm using spyder 4.1.2. Not sure do you have any virus scan or firewall that detecting some behavior and causes it hangs?
I fully agree with @Umer Nalla. In addition, I am thinking that any machine can easily have installed many versions of python, mine sure has many.
If this is the case, the version that is referenced by jupiter, has the correct version of eikon module installed. This version is often in C:\ProgramData\Python\version on windows boxes.
The version of python that is in your system path and found by Spyder by default, can be different. Or even the same, but installed separately, in a different location. Then it would need the latest eikon module to be installed separately on it.
This may not be it, the major version in system path is easy to ascertain, run cmd shell, and in it try
You can, same way, check if the eikon is installed on that specific python
python -m pip freeze | findstr eikon
WARNING: Could not generate requirement for distribution -ywin32 224 (c:\programdata\anaconda3\lib\site-packages): Parse error at "'-ywin32='": Expected W:(abcd...) WARNING: Could not generate requirement for distribution -umpy 1.16.2 (c:\programdata\anaconda3\lib\site-packages): Parse error at "'-umpy==1'": Expected W:(abcd...) WARNING: Could not generate requirement for distribution - win32 (c:\programdata\anaconda3\lib\site-packages): Parse error at "'-===win3'": Expected W:(abcd...) eikon==1.1.2
Check the same, within pybook, for comparison.
Hope this info helps
I am unable to create a new Eikon App Key in the App Key Generator (error "Error: Server error: An internal error occurred. (Error Id:'fde32c3d-f7da-4e21-b046-df35bebe1128')"). Nor am i able to delete an existing App. Please could someone assist?