IIS error when running flask
5 posts
• Page 1 of 1
- raggiskula
- Posts: 3
- Joined: 27 Dec 2013, 09:36
IIS error when running flask
Hi
I'm a Flask app with Helicon Zoo on IIS 8.0 and I'm getting the following error from Helicon
Any idea what this means?
I'm a Flask app with Helicon Zoo on IIS 8.0 and I'm getting the following error from Helicon
- Code: Select all
Worker Status
Online
Windows error
The pipe has been ended. (ERROR CODE: 109)
Internal module error
message: Connection has broken type: ZooException file: ZooApplication.cpp line: 890 version: 3.1.98.496
STDERR
Traceback (most recent call last): File "C:\Zoo\Workers\python\zoofcgi.py", line 1072, in <module> run_wsgi_app(options.wsgi_app) File "C:\Zoo\Workers\python\zoofcgi.py", line 1013, in run_wsgi_app FCGIServer(wsgi_app).run() File "C:\Zoo\Workers\python\zoofcgi.py", line 776, in run conn.run() File "C:\Zoo\Workers\python\zoofcgi.py", line 569, in run self.process_input() File "C:\Zoo\Workers\python\zoofcgi.py", line 600, in process_input self._do_stdin(rec) File "C:\Zoo\Workers\python\zoofcgi.py", line 724, in _do_stdin self._start_request(req) File "C:\Zoo\Workers\python\zoofcgi.py", line 697, in _start_request req.run() File "C:\Zoo\Workers\python\zoofcgi.py", line 515, in run protocolStatus, appStatus = self.server.handler(self) File "C:\Zoo\Workers\python\zoofcgi.py", line 864, in handler for data in result: TypeError: 'NoneType' object is not iterable
Any idea what this means?
Re: IIS error when running flask
Hello!
1. Could you please show the file with wsgi application (usually named wsgi.py) and web.config file.
2. Is the Flask app working without Helicon Zoo, in development server?
Thank you!
1. Could you please show the file with wsgi application (usually named wsgi.py) and web.config file.
2. Is the Flask app working without Helicon Zoo, in development server?
Thank you!
- raggiskula
- Posts: 3
- Joined: 27 Dec 2013, 09:36
Re: IIS error when running flask
Hi Ruslan and thank you for the reply,
1: this is my wsgi.py:
And my web.config:
2: Yes, my flask app is working with the flask development server , i.e. app.run()
Thank you and best regards
-Ragnar
1: this is my wsgi.py:
- Code: Select all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# flake8: noqa
import os
import sys
import site
sys.path.insert(0, 'C:\\inetpub\\wwwroot\\Project')
activate_this = "C:\\inetpub\\wwwroot\\Project\\venv\\Scripts\\activate_this.py"
execfile(activate_this, dict(__file__=activate_this)) #activate virtaul env
def application(environ, start_response):
"""WSGI Application"""
from app import app as application
And my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<heliconZoo>
<clear />
<application name="python.project">
<environmentVariables>
<add name="VIRTUAL_ENV" value="%APPL_PHYSICAL_PATH%\venv" />
<add name="PATH" value="%APPL_PHYSICAL_PATH%\venv\Scripts;%PATH%" />
<add name="PYTHONPATH" value="%APPL_PHYSICAL_PATH%\venv\Lib\site-packages\;%APPL_PHYSICAL_PATH%\venv\Lib;%APPL_PHYSICAL_PATH%;%APPL_PHYSICAL_PATH%;C:\inetpub\wwwroot\NovaGSX\venv\Lib\site-packages" />
<add name="WSGI_APP" value="wsgi.application" />
<add name="CONSOLE_URL" value="console" />
<add name="DEPLOY_FILE" value="deploy.py" />
<add name="ERROR_LOG_DIR" value="log" />
<add name="ZOOFCGI_DEBUG" value="True" />
</environmentVariables>
</application>
</heliconZoo>
<handlers>
<remove name="NovaGSX#x86" />
<remove name="NovaGSX#x64" />
<remove name="python.project#x86" />
<remove name="python.project#x64" />
<add name="python.project#x64" path="*" verb="*" modules="HeliconZoo_x64" scriptProcessor="python.2.7.wsgi" resourceType="Unspecified" requireAccess="Script" preCondition="bitness64" />
<add name="python.project#x86" path="*" verb="*" modules="HeliconZoo_x86" scriptProcessor="python.2.7.wsgi" resourceType="Unspecified" requireAccess="Script" preCondition="bitness32" />
<!-- Django or WSGI application over fastcgi -->
<!-- HTTP backend (Tornado) over http -->
<!--
<add name="python.project#x86" scriptProcessor="python.2.7.http" path="*" verb="*" modules="HeliconZoo_x86" preCondition="bitness32" resourceType="Unspecified" requireAccess="Script" />
<add name="python.project#x64" scriptProcessor="python.2.7.http" path="*" verb="*" modules="HeliconZoo_x64" preCondition="bitness64" resourceType="Unspecified" requireAccess="Script" />
-->
</handlers>
</system.webServer>
</configuration>
2: Yes, my flask app is working with the flask development server , i.e. app.run()
Thank you and best regards
-Ragnar
Re: IIS error when running flask
Hello!
Looks like the issue in application function.
If you already have wsgi application object then you should not redefine it.
Instead of:
you should use:
Thank you!
Looks like the issue in application function.
If you already have wsgi application object then you should not redefine it.
Instead of:
- Code: Select all
def application(environ, start_response):
"""WSGI Application"""
from app import app as application
you should use:
- Code: Select all
from app import app
application = app
Thank you!
- raggiskula
- Posts: 3
- Joined: 27 Dec 2013, 09:36
Re: IIS error when running flask
Hi Ruslan,
You ware right, just use the flask object as the wsgi application object and I rocking
Thank you very much!
- Ragnar
You ware right, just use the flask object as the wsgi application object and I rocking
Thank you very much!
- Ragnar
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests