Error: While importing "app", an ImportError was raised:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/cli.py", line 240, in locate_app
__import__(module_name)
File "/home/ateetk/mysite/Crop_Prediction/app.py", line 12, in <module>
model = pickle.load(open('/home/ateetk/mysite/Crop_Prediction/model.pkl', 'rb'))
ModuleNotFoundError: No module named 'keras'
Related
Shrav#Shravanth-M MINGW64 /d/Projects
$ python -u "d:\Projects\jarvis 3\JarvisAI\main.py"
Traceback (most recent call last):
File "d:\Projects\jarvis 3\JarvisAI\JarvisAI\__init__.py", line 4, in <module>
from services.authenticate import verify_user
ModuleNotFoundError: No module named 'services'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\Projects\jarvis 3\JarvisAI\main.py", line 1, in <module>
import JarvisAI
File "d:\Projects\jarvis 3\JarvisAI\JarvisAI\__init__.py", line 16, in <module>
from JarvisAI.services.api_management_service.dist.manager import management as management_service
ModuleNotFoundError: No module named 'JarvisAI.services.api_management_service'
While running the code in terminal in python, after importing the db which is written inside my code through app, it was saying that the module is not found. Can any one help me out
> from app import db
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'app'
Can't Open anaconda, when i tried from the promp this appears:
Traceback (most recent call last): File
"C:\ProgramData\Anaconda3\lib\site-packages\qtpy_init_.py", line
204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py", line
6, in module
from anaconda_navigator.app.main import main File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py",
line 22, in module
from anaconda_navigator.utils.conda import is_conda_available File
"C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\utils_init_.py",
line 15, in module
from qtpy.QtGui import QIcon File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy_init_.py", line
210, in module
raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found
I'm attempting to set up an Odoo 12 instance with a Python 3.7 virtualenv on Ubuntu version 18.04 using Pycharm. I keep getting issues related to Werkzeug as follows:
If I use the desired version of werkzueg written in the requirements.txt file(Werkzeug==0.11.15) I get this error. I think this error comes from werkzueg's version not supporting Python 3.7
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/http.py", line 26, in <module>
from urllib2 import parse_http_list as _parse_list_header
ModuleNotFoundError: No module named 'urllib2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 2700, in <module>
from werkzeug.http import dump_options_header, dump_header, generate_etag, \
ImportError: cannot import name 'dump_options_header' from 'werkzeug.http' (/usr/local/lib/python3.7/dist-packages/werkzeug/http.py)
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/http.py", line 26, in <module>
from urllib2 import parse_http_list as _parse_list_header
ModuleNotFoundError: No module named 'urllib2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/http.py", line 28, in <module>
from urllib.request import parse_http_list as _parse_list_header
ImportError: cannot import name 'parse_http_list' from 'urllib.request' (/usr/lib/python3.7/urllib/request.py)
Original exception was:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/http.py", line 26, in <module>
from urllib2 import parse_http_list as _parse_list_header
ModuleNotFoundError: No module named 'urllib2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 2700, in <module>
from werkzeug.http import dump_options_header, dump_header, generate_etag, \
ImportError: cannot import name 'dump_options_header' from 'werkzeug.http' (/usr/local/lib/python3.7/dist-packages/werkzeug/http.py)
Process finished with exit code 1
If I use the most current version of werkzueg (Werkzeug==1.0.1) I get this error.
Traceback (most recent call last):
File "/home/alexvining/Documents/Odoo Dev Env/Odoo 12/odoo/odoo/http.py", line 32, in <module>
import werkzeug.contrib.sessions
ModuleNotFoundError: No module named 'werkzeug.contrib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 61, in <module>
import SocketServer as socketserver
ModuleNotFoundError: No module named 'SocketServer'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 58, in <module>
from http.server import BaseHTTPRequestHandler
ModuleNotFoundError: No module named 'http.server'; 'http' is not a package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 61, in <module>
import SocketServer as socketserver
ModuleNotFoundError: No module named 'SocketServer'
Original exception was:
File "/home/alexvining/Documents/Odoo Dev Env/Odoo 12/odoo/odoo/http.py", line 32, in <module>
import werkzeug.contrib.sessions
ModuleNotFoundError: No module named 'werkzeug.contrib'
During handling of the above exception, another exception occurred:
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 61, in <module>
import SocketServer as socketserver
ModuleNotFoundError: No module named 'SocketServer'
Process finished with exit code 1
Sorry that I had to shorten the error logs, stack overflow was giving me an error saying the message looked like spam.
Any help would be much appreciated!
werkzeug.contrib was removed in v1.0.0.
Changing the requirements.txt entry to
werkzeug==0.16.1
will work.
I am getting an error when I try to run CNN program CNN using my own data set. Im using Python2.7
File "C:\Python27\Lib\site-packages\nolearn\lasagne.py", line 9, in <module>
from lasagne.layers import get_all_layers
ImportError: No module named layers
I already upgrade my libraries before,and when I run the main file,I'm getting this error:
Traceback (most recent call last):
File "C:\Python27\mnis2.py", line 78, in <module>
net1.fit(train, target)
File "C:\Python27\lib\site-packages\nolearn\lasagne.py", line 140, in fit
self._print_layer_info(self.get_all_layers())
File "C:\Python27\lib\site-packages\nolearn\lasagne.py", line 376, in _print_layer_info
output_shape = layer.output_shape()
TypeError: 'tuple' object is not callable