ich hab hier ein ziemlich stranges Problem und hoffe auf einen Denkanstoß seit kurz vor Ostern denke ich mal läuft virtualenv nicht mehr, da hatte ich wenn ich mich recht entsinne ein Upgrade von Werkzeug gemacht.
Das Problem ist nun das es einen Import Error gibt den ich nicht wirklich nachvollziehen kann.
Hier mal der Aussazug aus dem uwsgi log:
Okay soweit sogut operator ist aber importierbar wenn ich es von Hand versuche.mapped 1237120 bytes (1208 KB) for 40 cores
*** Operational MODE: preforking+threaded ***
added /var/www/localhost/flask/env/ to pythonpath.
added /var/www/localhost/flask/env/lib/python2.7/ to pythonpath.
added /var/www/localhost/flask/env/lib/python2.7/site-packages/ to pythonpath.
Traceback (most recent call last):
File "./server_start.py", line 1, in <module>
from app import app
File "./app/__init__.py", line 1, in <module>
from flask import Flask
File "/var/www/localhost/flask/env/lib/python2.7/site-packages/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "/var/www/localhost/flask/env/lib/python2.7/site-packages/werkzeug/__init__.py", line 20, in <module>
from werkzeug._compat import iteritems
File "/var/www/localhost/flask/env/lib/python2.7/site-packages/werkzeug/_compat.py", line 2, in <module>
import operator
ImportError: No module named operator
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
Code: Alles auswählen
Srv03 # . /var/www/localhost/flask/env/bin/activate
Python 2.7.9 (default, Feb 10 2015, 15:42:31)
[GCC 4.8.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import app
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named app
>>> from app import app
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named app
>>> from flask import Flask
>>> import operator
>>>
Ebenso wenn ich mit dem VirtualEnv direkt den server Starte.
Daher stehe ich etwas auf dem Schlauch was jetzt das Problem ist.(env)Srv03 # python /var/www/localhost/flask/bildersuche/server_start.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Hier noch ein paar Sachen die ggf. weiterhelfen:
dev-python/virtualenv
Installed versions: 1.11.6(15:55:14 10.02.2015)(-doc -test PYTHON_TARGETS="python2_7 python3_3 -pypy -pypy3 -python3_4")
pip list
Hat noch Jemand das Problem oder ggf. Sachdienliche Hinweise, zur Zeit läuft das Ganze, da ich das virtualenv rausgenommen habeFlask (0.10.1)
Flask-Login (0.2.11)
Flask-SQLAlchemy (2.0)
Flask-WTF (0.11)
GeoIP (1.3.2)
itsdangerous (0.24)
Jinja2 (2.7.3)
MarkupSafe (0.23)
MySQL-python (1.2.5)
pip (6.1.0)
pip-tools (0.3.5)
setuptools (15.0)
SQLAlchemy (0.9.9)
Werkzeug (0.10.4)
WTForms (2.0.2)
was natürlich keine Dauerlösung darstellt.