I am using a jupyter notebook to test my python package but jupyter raises the following issue when I try to run my package:
AttributeError: module 'logging' has no attribute 'config'
There is a similar question here: Jupyter Notebook - Attribute Error: 'module' object has no attribute 'F_OK'
But the solution (downgrade conda and python) is not satisfying to me. Does anyone have another idea? For now I just comment the line in my code and it works but it is not very handy...
You only need to add import logging.config and it should fix your issue.
Related
I am using the package sktime and I wanted to use the RocketClassifier. Somehow when I run from sktime.classification.kernel_based import RocketClassifier from the python console it works. But when I run the code in a Jupyter Notebook (VS Code) I get following error: attributeerror module 'numba' has no attribute 'core.
I have numba version 58.0.4. Have someone maybe a solution for that or can someone explain me, why it is not working?
I am using Ubuntu environment and python 3.6. When i run "sift_ocl = sift.SiftPlan(template=image, devicetype="GPU")" then I am facing below error:
"AttributeError: 'NoneType' object has no attribute 'create_context'".
Few platforms also mentioned to check "import pyopencl" and it is also giving error on import "ImportError: libsvml.so: cannot open shared object file: No such file or directory", for which I didn't find exact solution.
I tried similar problems solution which are posted online and having ****.so dynamically linked shared object libraries issues but didn't work for me.
Please guide me, thanks.
I had run the following OneHotEncoder code on jupyter notebook, it's fine:
ColumnTransformer(transformers=[('col_tnf',OneHotEncoder(sparse=False,drop='first'),0,1,3,8,11])],remainder='passthrough')
It's running and gives the output,
while the same, I am running using PyCharm as a Streamlit app, its throwing error as
AttributeError: 'OneHotEncoder' object has no attribute '_infrequent_enabled'
Issue is resolve. You need to update the sklearn version same as the version you are using in jupyter notebook
I have a Django project running on Azure, and I encountered this issue with the enum module and I have tried everything from
here(Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?)
The problem is that I don't have the issue locally, I only see the issue on Azure. Therefore, I cannot just uninstall it locally. I have tried to uninstall it in the Azure terminal, but it showed that the module was not found. I have also tried to install aenum instead of enum by adding it to requirements.txt, still didn't work.
Can someone PLEASE advise me on how to fix this issue?
Here is a screenshot of the error
Here is the link to the source code In the folder, the problem occurred after we added "search".
I am using the Matlab Engine for Python.
When I try to run the command:
matlab.engine.find_matlab()
in the python prompt, I get the following error:
AttributeError: 'module' object has no attribute 'find_matlab'
I looked into the source code of the corresponding module (matlabeninge.py), there is no 'find_matlab' method in it, or other methods listed in the Mathworks documentation.
Though I can properly start a Matlab session using:
matlab.engine.matlab_startup()
I tried reinstalling both Matlab & the Python package, nothing changed. It's as if the module lacks some code.
Has anyone else encountered this?
Please try to follow the example listed here
The syntax is :
names = matlab.engine.find_matlab()
did that solve the issue ?
I used the following line to solve a similar issue: (so I imported matlab.engine two times)
import matlab.engine
I called eng = matlab.engine.start_matlab('-desktop') after it and got the following error message without the import:
AttributeError: 'int' object has no attribute 'engine'