I am unable to run the app.py file for flask - python

I am unable to run the app.py file for flask
Traceback (most recent call last):
File "c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 256, in locate_app
__import__(module_name)
File "C:\Users\admin\ML PYTHON\Fake_news_detection\App\app.py", line 2, in <module>
from sklearn.externals import joblib
ImportError: cannot import name 'joblib' from 'sklearn.externals' (c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\sklearn\externals\__init__.py)

Related

Traceback (most recent call last): error on Anaconda launching

I'm trying to launch Application on Anaconda, but I have this application launch error:
Traceback (most recent call last):
File "C:\Users\emanu\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\emanu\anaconda3\lib\site-packages\notebook\__init__.py", line 27, in
from .nbextensions import install_nbextension
File "C:\Users\emanu\anaconda3\lib\site-packages\notebook\nbextensions.py", line 26, in
from .config_manager import BaseJSONConfigManager
File "C:\Users\emanu\anaconda3\lib\site-packages\notebook\config_manager.py", line 14, in
from traitlets.config import LoggingConfigurable
File "C:\Users\emanu\AppData\Roaming\Python\Python38\site-packages\traitlets\__init__.py", line 1, in
from .traitlets import *
File "C:\Users\emanu\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py", line 61, in
from .utils.sentinel import Sentinel
ModuleNotFoundError: No module named 'traitlets.utils.sentinel'
I already update the PIP, but nothing works. How to solve?

Error executing jupyter notebook : ImportError: cannot import name '_RuleList'

When I execute jupyter notebook command I get
jupyter notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 6, in <module>
from notebook.notebookapp import main
File "/usr/local/lib/python3.6/dist-packages/notebook/notebookapp.py", line 63, in <module>
from tornado import web
File "/usr/local/lib/python3.6/dist-packages/tornado/web.py", line 95, in <module>
from tornado.routing import (
ImportError: cannot import name '_RuleList'
(my_project_env)

getting web_socket error while running python project

I getting this error while running this project https://github.com/victordibia/skyfall
Traceback (most recent call last): File "app.py", line 19, in
from utils import web_socket_client File "C:\Users\anurag\Downloads\skyfall-master\utils\web_socket_client.py",
line 8, in
from websocket import WebSocketException, WebSocketConnectionClosedException ImportError: cannot import name
'WebSocketException'

Python ImportError: No module named 'funds'

I cloned a repo from github
I keep getting this error when I try running the code:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import api.py
File "C:\xampp\htdocs\projects\mf\mf-platform-bse\mf-platform-bse\api.py", line 10, in <module>
from models.transactions import TransactionBSE, TransactionXsipBSE, TransResponseBSE, Transaction, PaymentLinkBSE
File "C:\xampp\htdocs\projects\mf\mf-platform-bse\mf-platform-bse\models\transactions.py", line 4, in <module>
from funds import SchemePlan, FundScheme
ImportError: No module named 'funds'
Here is my folder structure inside the models folder

ImportError: cannot import name _wapi

I have installed py2exe. I am trying a convert a script in to .exe. Here is my setup script.
from distutils.core import setup
import py2exe
setup(console=['Script1.py'])
When i run this, I am getting import error. The traceback is given below.
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
exec codeObject in __main__.__dict__
File "C:\Users\z010388-dev\Desktop\setup.py", line 2, in <module>
import py2exe
File "C:\Python27\lib\site-packages\py2exe\__init__.py", line 9, in <module>
patch_distutils()
File "C:\Python27\lib\site-packages\py2exe\patch_distutils.py", line 68, in patch_distutils
from . import distutils_buildexe
File "C:\Python27\lib\site-packages\py2exe\distutils_buildexe.py", line 91, in <module>
from . import runtime
File "C:\Python27\lib\site-packages\py2exe\runtime.py", line 3, in <module>
from .dllfinder import Scanner, pydll
File "C:\Python27\lib\site-packages\py2exe\dllfinder.py", line 5, in <module>
from . import _wapi
ImportError: cannot import name _wapi
Is anything wrong with my setup script? What is wrong?

Categories