<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-forward-container"><br>
<br>
-------- Messaggio Inoltrato --------
<table class="moz-email-headers-table" cellspacing="0"
cellpadding="0" border="0">
<tbody>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Oggetto:
</th>
<td>Re: [moin-user] MoinMoin2 on pythonanywhere</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Data: </th>
<td>Mon, 3 Feb 2020 17:55:51 +0100</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Mittente:
</th>
<td>Renato Pontefice <a class="moz-txt-link-rfc2396E" href="mailto:renato.pontefice@gmail.com"><renato.pontefice@gmail.com></a></td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">A: </th>
<td>Roger Haase <a class="moz-txt-link-rfc2396E" href="mailto:crosseyedpenguin@yahoo.com"><crosseyedpenguin@yahoo.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi,</p>
<p>my virtualenv name is:/home/MOINMOIN2/moin-venv-python3/ python
version is 3.7</p>
<p>this is my rp20_pythonanywhere_com_wsgi.py:</p>
<blockquote>
<pre>from MoinMoin.app import create_app
application = create_app('/home/rp20/moin/wikiconfig.py')
# This file contains the WSGI configuration required to serve up your
# web application at <a class="moz-txt-link-freetext" href="http://rp20.pythonanywhere.com/" moz-do-not-send="true">http://rp20.pythonanywhere.com/</a>
# It works by setting the variable 'application' to a WSGI handler of some
# description.
#
# +++++++++++ GENERAL DEBUGGING TIPS +++++++++++
# getting imports and sys.path right can be fiddly!
# We've tried to collect some general tips here:
# <a class="moz-txt-link-freetext" href="https://help.pythonanywhere.com/pages/DebuggingImportError" moz-do-not-send="true">https://help.pythonanywhere.com/pages/DebuggingImportError</a>
# +++++++++++ HELLO WORLD +++++++++++
# A little pure-wsgi hello world we've cooked up, just
# to prove everything works. You should delete this
# code to get your own working.
HELLO_WORLD = """<html>
<head>
<title>PythonAnywhere hosted web application</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>
This is the default welcome page for a
<a href=<a class="moz-txt-link-rfc2396E" href="https://www.pythonanywhere.com/" moz-do-not-send="true">"https://www.pythonanywhere.com/"</a>>PythonAnywhere</a>
hosted web application.
</p>
<p>
Find out more about how to configure your own web application
by visiting the <a href=<a class="moz-txt-link-rfc2396E" href="https://www.pythonanywhere.com/web_app_setup/" moz-do-not-send="true">"https://www.pythonanywhere.com/web_app_setup/"</a>>web app setup</a> page
</p>
</body>
</html>"""
def application(environ, start_response):
if environ.get('PATH_INFO') == '/':
status = '200 OK'
content = HELLO_WORLD
else:
status = '404 NOT FOUND'
content = 'Page not found.'
response_headers = [('Content-Type', 'text/html'), ('Content-Length', str(len(content)))]
start_response(status, response_headers)
yield content.encode('utf8')
# Below are templates for Django and Flask. You should update the file
# appropriately for the web framework you're using, and then
# click the 'Reload /yourdomain.com/' button on the 'Web' tab to make your site
# live.
# +++++++++++ VIRTUALENV +++++++++++
# If you want to use a virtualenv, set its path on the web app setup tab.
# Then come back here and import your application object as per the
# instructions below
# +++++++++++ CUSTOM WSGI +++++++++++
# If you have a WSGI file that you want to serve using PythonAnywhere, perhaps
# in your home directory under version control, then use something like this:
#
#import sys
#
#path = '/home/rp20/path/to/my/app
#if path not in sys.path:
# sys.path.append(path)
#
#from my_wsgi_file import application # noqa
# +++++++++++ DJANGO +++++++++++
# To use your own django app use code like this:
#import os
#import sys
#
## assuming your django settings file is at '/home/rp20/mysite/mysite/settings.py'
## and your manage.py is is at '/home/rp20/mysite/manage.py'
#path = '/home/rp20/mysite'
#if path not in sys.path:
# sys.path.append(path)
#
#os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
#
## then:
#from django.core.wsgi import get_wsgi_application
#application = get_wsgi_application()
# +++++++++++ FLASK +++++++++++
# Flask works like any other WSGI-compatible framework, we just need
# to import the application. Often Flask apps are called "app" so we
# may need to rename it during the import:
#
#
#import sys
#
## The "/home/rp20" below specifies your home
## directory -- the rest should be the directory you uploaded your Flask
## code to underneath the home directory. So if you just ran
## "git clone <a class="moz-txt-link-abbreviated" href="mailto:git@github.com/myusername/myproject.git" moz-do-not-send="true">git@github.com/myusername/myproject.git</a>"
## ...or uploaded files to the directory "myproject", then you should
## specify "/home/rp20/myproject"
#path = '/home/rp20/path/to/flask_app_directory'
#if path not in sys.path:
# sys.path.append(path)
#
#from main_flask_app_file import app as application # noqa
#
# NB -- many Flask guides suggest you use a file called run.py; that's
# not necessary on PythonAnywhere. And you should make sure your code
# does *not* invoke the flask development server with app.run(), as it
# will prevent your wsgi file from working.
</pre>
</blockquote>
<div class="moz-cite-prefix">Il 03/02/20 15:49, Roger Haase ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:1497840399.925060.1580741387556@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div class="ydpdd6960fyahoo-style-wrap" style="font-family:
Helvetica Neue, Helvetica, Arial, sans-serif; font-size:
13px;">
<div dir="ltr" data-setdir="false">A guess is you failed to
follow the instructions. A second guess is the instructions
are wrong. A third guess is you loaded moin 1.9;
instructions are only for moinmoin2.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">Go to (replacing MOINMOIN2
with your account name):</div>
<div dir="ltr" data-setdir="false"><br>
<div>
<div>
<a class="moz-txt-link-freetext"
href="https://www.pythonanywhere.com/user/MOINMOIN2/webapps/#tab_id_MOINMOIN2_pythonanywhere_com"
moz-do-not-send="true">https://www.pythonanywhere.com/user/MOINMOIN2/webapps/#tab_id_MOINMOIN2_pythonanywhere_com</a></div>
<div><br>
</div>
<div>Scroll down to about the middle of the page to the
section labeled "Code"</div>
<div dir="ltr" data-setdir="false">and copy and paste the
contents of the code section to your reply email.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">----------------</div>
<div><br>
</div>
<div> Code:</div>
<div><br>
</div>
<div> What your site is running.</div>
<div> Source code:
/home/MOINMOIN2/moin/src/moin</div>
<div><br>
</div>
<div> Working directory:
/home/MOINMOIN2/moin</div>
<div><br>
</div>
<div> WSGI configuration file:
/var/www/MOINMOIN2_pythonanywhere_com_wsgi.py</div>
<div><br>
</div>
<div> Python version: 3.7</div>
<div><br>
</div>
<div><br>
</div>
<div> Virtualenv:</div>
<div><br>
</div>
<div> -- snip 3 lines --</div>
<div><br>
</div>
<div> /home/MOINMOIN2/moin-venv-python3.7/</div>
</div>
<div><br>
</div>
<div>-------------------</div>
<div><br>
</div>
<div dir="ltr" data-setdir="false">Also copy and paste the
contents of the <span><span style="color: rgb(0, 0, 0);
font-family: Helvetica Neue, Helvetica, Arial,
sans-serif;"> /var/www/MOINMOIN2_pythonanywhere_com_wsgi.py
file.</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica,
Arial, sans-serif;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica,
Arial, sans-serif;"><br>
</span></span></div>
</div>
</div>
<div id="yahoo_quoted_1680220963" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial,
sans-serif;font-size:13px;color:#26282a;">
<div> On Monday, February 3, 2020, 05:08:17 AM MST, Renato
Pontefice <a class="moz-txt-link-rfc2396E"
href="mailto:renato.pontefice@gmail.com"
moz-do-not-send="true"><renato.pontefice@gmail.com></a>
wrote: </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div id="yiv3911410229">
<div dir="ltr">
<div>Hi,</div>
<div>it still dont work</div>
<div>and on log errorm I found:this:</div>
<div><br>
</div>
<div> >
***************************************************<br>
2020-02-03 11:55:44,235: Error running WSGI
application<br>
2020-02-03 11:55:44,271: ModuleNotFoundError: No
module named 'MoinMoin'<br>
2020-02-03 11:55:44,271: File
"/var/www/rp20_pythonanywhere_com_wsgi.py", line 1,
in <module><br>
2020-02-03 11:55:44,272: from MoinMoin.app
import create_app<br>
2020-02-03 11:55:44,272:
***************************************************</div>
<div><br>
</div>
<div>who has to put MoinMoin module on that directory?</div>
<div>Why it is not there?</div>
<div><br>
</div>
<div>TIA</div>
<div>Renato<br>
</div>
</div>
</div>
_______________________________________________<br>
moin-user mailing list<br>
<a ymailto="mailto:moin-user@python.org"
href="mailto:moin-user@python.org"
moz-do-not-send="true">moin-user@python.org</a><br>
<a
href="https://mail.python.org/mailman/listinfo/moin-user"
target="_blank" moz-do-not-send="true">https://mail.python.org/mailman/listinfo/moin-user</a><br>
</div>
</div>
</div>
</blockquote>
</div>
</body>
</html>