I'm getting this error
AttributeError: module 'config' has no attribute 'ConfigurationSet
import refinitiv.dataplatform.eikon as ek
In python IDLE shell 3.9.4. any help is appreciated.
I want to confirm where the specific issues/successes are.
Regarding #3, can you use the get_data() call?
Can you compare the versions of the python packages you have within your environment(s) and CodeBook? You can see what packages are installed within CodeBook by opening the "Libraries&Extension" file.
Were you ever successful at running your applications outside of CodeBook? Seems we may have environmental issues that we need to hunt down.
Can you ensure you are using the latest version of the refinitiv.dataplatform package?
pip install --upgrade refinitiv.dataplatform
I just downloaded Python 3.9.4 and create a single cell that contains:
import refinitiv.dataplatform.eikon as ek
And did not observe any error.
Unfortunately, that didn't help. The package was up to date. I switched to using jupyter notebook, which does not return this error. However, something else is wrong because a simple get_timeseries with one commodity and one month period does not return any results. it stays in execution for a long time that I have to kill it.
The same three lines run without any problem in the Eikon CodeBook app.
Thanks @nick.zincone for following up. I really appreciate you taking the time for this.
Here's my response point-wise:
1- Confirmed. I cannot import refinitiv.dataplatform or refinitiv.dataplatform.eikon in Python IDLE and I receive the error AttributeError: module 'config' has no attribute 'ConfigurationSet'
2 & 3- Confirmed. Jupyter does not return the AttributeError mentioned above and freezes. I have looked in the log of jupyter and there are several error messages and warnings and they seem related to tornado package. See attached a copy of the log. The main issues I see are:
I have compared the packages installed on my machine vs. what is loaded in the libraries&extensions file yesterday and installed all of them to the same version in CodeBook or a later one if available on pypi.
Finally, I was only successful in running the app outside CodeBook today after installing and importing eikon as ek in IDLE. otherwise it did not work.
Hi @Mohammad.Alsele ,
Could you check python-configuration lib version with "pip show python-configuration" command ?
You shoud have 0.8.2 version:
If it is not the case (or if you don't have any version), you can install/upgrade manually :
pip install --upgrade python-configuration
It is 0.8.2.
I tried ipython and I have no problems there. The issue seems to only be with jupyter (both notebook and lab)
Maybe an important detail that I have not mention. I am not using a conda installation. I installed python as standalone software and all packages are installed/maintained with pip
Thanks @pf and @nick.zincone for your effort to help me out. Since it's been a few days with this issue and it has, maybe, been complicated with different issues that I raised. So, I'll summarise the latest status. hopefully, clarifying the key issues here to anyone who would want to help .
1- Python IDLE
3- Jupyter notebook
Since import eikon in IDLE works fine, I don't need help figuring out what's the issue with refinitive.dataplatform.eikon is.
What I need help with is getting jupyter to work proplery. considering this question was started in relation to IDLE and the configuration issue and that was avoided by the use of import eikon, I will close this thread and start a new question for the issue with jupyter.
Hi @Mohammad.Alsele I think I have the solution why it works everywhere except in your IDE.
the refinitiv dataplatform has an issue where it imports a config class. Which is fine of course, but the problem is that it searches ANYWHERE in the directory for a config.py file. If you happen to have your own config.py file (might be from another package), then refinitiv will use YOUR config.py file, instead of its own config class. of course that will crash, saying "module 'config' has no attribute 'ConfigurationSet'".
the solution is to remame your own config.py file.
what i am saying is that you should take a good look in the directory where your python file that you are running resides, and look for config.py files.
in my case, i am using pycharm, my own config.py file resided in the same dir as my python file i wanted to run