添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • Does Flask Rate Limiter work with Elasticache (Redis 2.8)?
  • SQLAlchemy DELETE from many-to-many relationship
  • uWSGI kill issue
  • Flask Jinja2 not rendering bootstrap carousel
  • Why can't I decode a JSON message in the following situation?
  • Implementing a Flask blueprint so that it can be safely mounted more than once?
  • Flask table only shows first line from Python list, for loop not working on rows
  • How to handle multiple 'GET' endpoints in a Flask-Restplus response class
  • Azure flask app deployed always shows the default landing page
  • SQLalchemy + Flask: dynamic AND query
  • How do web servers stay alive?
  • Start and Stop a flask app multiple times within a process using gevents Wsgi server
  • Flask-Migrate "No section: 'alembic'" on "db migrate" command
  • Get the current function name in the Flask template context
  • How to reopen sqlite connection in flask app?
  • Virtualenv and libpython
  • tensorflow batch normalization after a restore
  • python3 importing pygame results in PyCObject_AsVoidPtr
  • Sorting a mixed list of ints and strings
  • How to format .schema output with SQLite3?
  • Python ValueError: Invalid header name b':authority
  • Python store dictionary path and read back in
  • Extract hours and minutes from a string python
  • How can I get an attached eml file from email message content using Python?
  • How to send and receive large numpy arrays (several GBs) using flask
  • machine_learning

  • Tensor shape in tensorflow
  • How to train CNN with an RGB Image
  • Explanation Needed for Autokeras's AutoModel and GraphAutoModel
  • Tensorflow Contrib Metrics always return 0.0
  • Calculate Jacobian Matrix in TensorFlow v.2 with GradientTape()
  • sklearn's GradientBoostingRegressor gives the same prediction for different inputs
  • Identifying points by color
  • Multivariate Gaussian distribution formula implementation
  • Errors when saving a Keras ML model
  • How to correctly derivate quadratic cost function
  • When deploying a python 3.7+ flask or Dash application on IIS using wfastcgi, there are many great tutorials to get a hello work program working such as

    https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

    Where this process fell apart for me and seeming for other users such as

    Can't get dash app run on IIS with flask server

    How to deploy python flask application in conda base environment on IIS server?

    was when other packages started coming into the mix such as Numpy, Pandas, Dash, Plotly Express, etc.

    The error that get throw tended to depend on the package but usually resembled a large block of test that looks like the error bellow starting with Error occurred while reading WSGI handler and featuring things like Dll load failures or missing components.

    Error occurred while reading WSGI handler: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\wfastcgi.py", line 791, in main env, 
    handler = read_wsgi_handler(response.physical_path) File "C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\wfastcgi.py", line 633,
    in read_wsgi_handler handler = get_wsgi_handler(os.getenv("WSGI_HANDLER")) File "C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\wfastcgi.py", line 616,
    in get_wsgi_handler raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb)) ValueError: "dashapp.server" could not be imported: Traceback 
    (most recent call last): File "C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\wfastcgi.py", line 600, 
    in get_wsgi_handler handler = __import__(module_name, fromlist=[name_list[0][0]]) File ".\dashapp.py", line 3, in from flaskapp import app File ".\flaskapp\__init__.py", 
    line 67, in register_dashapps(app) File ".\flaskapp\__init__.py", line 19, in register_dashapps from flaskapp.dashapp_searchtool.layout import layout File ".\flaskapp\dashapp_searchtool\layout.py", line 30,
     in import pandas as pd File "C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\pandas\__init__.py", line 17, in "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
     ImportError: Unable to import required dependencies: numpy: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy c-extensions failed. - 
     Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.7 from "C:\ProgramData\Anaconda3\envs\dash_search_app\python.exe", 
     and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version "1.17.3" you're trying to use. 2. If (1) looks fine,
     you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python 
     - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and 
     ideally a build log - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. Note: 
     this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: DLL load failed: 
     The specified module could not be found. StdOut: StdErr: C:\ProgramData\Anaconda3\envs\dash_search_app\lib\site-packages\flask_sqlalchemy\__init__.py:794: 
     FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
    

    The most common advice is to downgrade to python 3.6, however this is not possible for every project.

    I've answered bellow my solution in case others may have the same issue as my hours of googling did not result in me finding a solution.

    Accepted answer

    For me, this came down to a permissions issue. My first speculation was that the environment was not registering correctly, however in fact it was that IIS did not have permission to access all the dependencies of the environment.

    How I resolved this was to navigate to my Anaconda3 folder, right click and select properties. In the properties window, I navigated to the security tab and clicked Edit

    I then clicked 'Add' to add users and bring up the following window

    Under Object Type, I selected all the options, and Locations I selected the top level location.

    Under Object names I wrote iis apppool<yoursitename> for example, for an IIS site named app, it would be iis apppool\app

    I then clicked check names to ensure the app could be found, and then proceeded to click ok and apply.

    Once the permissions were added, the IIS site could access all the required dlls and such and the app functioned correctly

    Related Query

  • Deploying Python Flask Application on IIS with wfastcgi in Python 3.7+ with Numpy, Pandas, etc
  • Deploying a python Flask application with Jenkins and executing it
  • Python Flask with celery out of application context
  • Integrating Swagger/OpenAPI generated python server with existing Flask application
  • Deploying a Flask application with CGI
  • deploying python flask app on heroku gives error with functools32
  • Deploying a flask application with mod_wsgi
  • Python Flask application stuck with no response
  • How to deploy python flask application in conda base environment on IIS server?
  • random issues with python flask application on apache
  • Python flask web application with multilanguages support by host and prefix
  • How to open a remote file with GDAL in Python through a Flask application
  • Deploying Flask application with uwsgi and nginx
  • Make python Flask application accessible from the Internet with gunicorn
  • Problems with deploying flask WSGI application on apache2
  • "RuntimeError: Working outside of application context " with Python Flask app ( Sending gmail using scheduler )
  • MissingParentDirectory when Deploying python application as an image in aws lambda with subfolders
  • Flask with UWSGI: Python application not found
  • Problem with Procfile / wsgi when deploying to heroku with python flask app ~ Failed to find attribute
  • RuntimeError: Working outside of application context with Celery and Flask in Python
  • Deploying Flask Socket.io application with eventlet on heroku
  • Running a simple python flask application using .cfg config files. I can't seem to return the config values, getting a keying error with them
  • plotly-dash on iis with flask and wfastcgi
  • Deploying Python flask application using nginx/gunicorn on Amazon Linux EC2 instance
  • Python Flask Application on IBM cloud/bluemix with Textblob library throwing exception - textblob.exceptions.MissingCorpusError
  • Run Python Flask application with nginx Unit
  • Deploying Python Flask App on Apache with Python version installed in Virtual Environment Only
  • Configure Python flask application with apache and mod_wsgi in linux
  • deploying python flask application in apache 24
  • How To Deploy an Update to Python Flask Application with Gunicorn and Nginx on Ubuntu 18.04
  • Python 3.8.5 Flask giving internal server error with WSGI application when template is called using render_template in VS Code - 500 server error
  • Error "resource Punkt not found" when deploying Python Flask with nltk to gcp
  • Keeping Variable Data on Heroku with Python Flask Application
  • Python Flask application - How to make html input tag with dropdown updated by javascript ajax function
  • Gitlab Flask Page: Problems with installing python GDAL package for Frozen Flask Application with .gitlab-ci.yml file
  • IoT Python application architecture with Flask on Raspberry Pi
  • IIS - Flask python script webconfig error wfastcgi
  • error passing variables python web application with flask
  • Python Flask factory application problem with Flask-Mqtt has no attribute 'init_app'
  • Trouble with Python Flask Tutorial application
  • Heroku H10 error when deploying Flask application with Psycopg2
  • How to structure apache virtual host and wsgi file for Flask application with python 3.10 on raspbian
  • Is there any alternative approach other than deploying python flask application in Google app engine flex environment?
  • Deploying Flask application with Apache2 Proxy Server
  • How do I define a base endpoint for my Python Flask application with swagger?
  • 500 Internal Server Error when uploading file >~120kb to Flask web app running on Windows IIS Server with wfastcgi
  • Using Neo4j Java API with Python Flask application - how?
  • Using Neo4j Java API with Python Flask application - how?
  • What is the best way to deploy a Python Flask application along with a ReactJS application?
  • Error when deploying Flask application on IIS
  • More Query from same tag

  • 'No application found. Either work inside a view function or push' RuntimeError: No application found
  • Using flask-socketio, how can I asynchornously emit multiple messages in one function?
  • load_user function gets None as a parameter
  • Multiple route mapping to different matplotlib graphs in flask app
  • Passing urls and IDs back and forth using flask jinja2 and bootstrap templates
  • URL History in Flask application
  • Flask + Socketio - How do I join a room inside a route (not inside a socketio function)
  • Not able to write to a file in static directory of dockerised flask application deployed in kubernetes
  • sqlalchemy.orm.exc.UnmappedInstanceError: Class '__main__.User' is not mapped on Flask-SQLAlchemy
  • AttributeError: type object 'Cliente' has no attribute 'query'
  • calling select query after update query with flask-sqlalchemy db.engine.execute() returns un-updated resultset
  • Flask / Eve: Internal GET request with parameters
  • Bulk Mailing multiple Attachments result in corrupted files in Flask
  • how to monitor outgoing HTTPS
  • How to do nested comments in Flask/Jinja?
  • What does `if file` check for when uploading a file in Flask
  • How to display ImageGridFSProxy in HTML?
  • Iterate through multiple objects returned by sqlalchemy query filter
  • How do I access an object response (rather than a list) in jqueryui autocomplete?
  • How to store my own variables on flask
  • Flask allows multiple server instances to listen on the same port
  • Flask Admin validate unique_with errors
  • ORM query many to many to one, Flask sql-alchemy
  • Simple flask application with docker giving 404
  • Redirect to internal URL ignored within facebook app canvas
  • Flask can't find 'password' field when using SQLAlchemy's hybrid_property
  • Image not showing with Flask HTML CSS background image
  • Azure Flask HTTP Error 500.0 - INTERNAL SERVER ERROR
  • How to receive jsonify variables on .js file from flask
  • OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")
  • Flask inside docker does not get json requests
  • How to run flask shell in PyCharm?
  • Stripe API; {'error': 'invalid_grant', 'error_description': 'This authorization code has already been used
  • How do i correct JSONDecoderError?
  • eventlet.monkey_patch() is ignoring child processes
  • Machine Learning: How do I apply one hot encoding on a pandas dataframe with both categorical and numerical features? Python Data Prediction How to update linear regression line with live data TensorFlow. Changes in code in CIFAR10 example are not reflected when I run cifar10_train.py Estimators: What to use for placeholder in an accuracy prediction? TensorFlow - optimization with normalization constraints tf.GradientTape giving None gradient while writing custom training loop Are these functions equivalent in TensorFlow? LSTM won't overfit training data Connecting LSTM to a fully connected layer in Tensorflow Can not filter using a string field using python-eve when the value is the _id for other object in mongodb Deploying flask app to Heroku - web.1: crashed How to unmarshall incoming request payload as method/function arguments based on content type in Python flask or bottle frameworks while using server sent events browser caching previous data. How to prevent browser caching python flask send data through post and url Modelling with Flask-SQLAlchemy and Python How to use mandrill module with flask security? Most Pythonic way to abort a cache decorator? With Flask and JQuery, how to delete a record by "POST" method in "sexy" way?