Jump to content

Recommended Posts

Posted (edited)

Hi,

im trying to deploy a flask app in tommy, i've followed https://www.helionet.org/index/topic/27822-how-do-i-use-flask-on-johnny/?p=128919 with no success, i've got "Internal server error".

 

i think some libraries are missing, but i dont know how to install them (mercadopago, wtforms, flask_sslify, etc).

 

i've also tried to debug the app, and it seems to be an error in vars declarations.

 

What can i do?

 

Thanks!

 

SUsoft

Edited by Krydos
found the missing text
  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Posted

hi again! i was debugging and i realized i need some libraries installed.

*flask_sslify

*mercadopago (https://www.mercadopago.com.ar/developers/es/)

*flask_mail

 

im working on tommy.

thanks in advance!

 

2017-08-27 14:13 GMT-03:00 Heliohost Support :

 

> Whatever mail client you used doesn't seem to agree with our mail

> processing scripts. Since the subject has the word flask have you seen this

> guide?https://www.helionet.org/index/topic/27822-how-do-

> i-use-flask-on-johnny/?p8919

>

> You may view the status of your ticket by visiting:

>

> https://www.helionet.org/index/index.php?showtopic)441

>

> Thank you,

> Heliohost support

> https://www.heliohost.org/

> https://www.helionet.org/

>

>

Posted

thank you a lot, but I still getting 500 internal server error, dont know

where :/

 

2017-08-28 23:40 GMT-03:00 Heliohost Support :

 

> There you go http://krydos.heliohost.org/cgi-bin/modules36.py

>

> You may view the status of your ticket by visiting:

>

> https://www.helionet.org/index/index.php?showtopic)441

>

> Thank you,

> Heliohost support

> https://www.heliohost.org/

> https://www.helionet.org/

>

>

Posted

Same error as last time you asked:

 

[Mon Aug 28 20:07:28.837058 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] mod_wsgi (pid=22740): Target WSGI script '/home/susoft1/public_html/flask/flask.wsgi' cannot be loaded as Python module.

[Mon Aug 28 20:07:28.837155 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] mod_wsgi (pid=22740): Exception occurred processing WSGI script '/home/susoft1/public_html/flask/flask.wsgi'.

[Mon Aug 28 20:07:28.879874 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] Traceback (most recent call last):

[Mon Aug 28 20:07:28.880050 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] File "/home/susoft1/public_html/flask/flask.wsgi", line 7, in <module>

[Mon Aug 28 20:07:28.880068 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] from views import app as application

[Mon Aug 28 20:07:28.880153 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] File "/home/susoft1/public_html/flask/views.py", line 111

[Mon Aug 28 20:07:28.880192 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] errorEnDni=True

[Mon Aug 28 20:07:28.880313 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] ^

[Mon Aug 28 20:07:28.880341 2017] [wsgi:error] [pid 22740:tid 140299401623296] [client x.x.x.x:53803] TabError: inconsistent use of tabs and spaces in indentation

Posted

Maybe i should upload my flask.wsgi file? My app is called views.py

 

import os, sys

 

# edit your username below

sys.path.append("/home/susoft1/public_html/flask");

 

sys.path.insert(0, os.path.dirname(__file__))

 

from views import app as application

Posted

Line 7 of dispatch.wsgi calls

 

from views import app as application

 

which loads up views.py and it encounters an error on line 111 because the tabs and spaces are inconsistent. A common reason for this error is using a tab in one place and four spaces in another. They look the same in your editor, but it will cause this error. Check out https://stackoverflow.com/questions/5685406/inconsistent-use-of-tabs-and-spaces-in-indentation

Posted

Yep, you fixed the tabs/spaces error. Here is the new error:

 

[Tue Aug 29 14:21:16.558991 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] mod_wsgi (pid=30183): Target WSGI script '/home/susoft1/public_html/flask/flask.wsgi' cannot be loaded as Python module.

[Tue Aug 29 14:21:16.559107 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] mod_wsgi (pid=30183): Exception occurred processing WSGI script '/home/susoft1/public_html/flask/flask.wsgi'.

[Tue Aug 29 14:21:16.559725 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] Traceback (most recent call last):

[Tue Aug 29 14:21:16.559788 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] File "/home/susoft1/public_html/flask/flask.wsgi", line 7, in <module>

[Tue Aug 29 14:21:16.559807 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] from views import app as application

[Tue Aug 29 14:21:16.559823 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] File "/home/susoft1/public_html/flask/views.py", line 4, in <module>

[Tue Aug 29 14:21:16.559829 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] from app import app #Comentar para srv. prod.

[Tue Aug 29 14:21:16.559858 2017] [wsgi:error] [pid 30183:tid 140299401623296] [client x.x.x.x:50743] ModuleNotFoundError: No module named 'app'

 

Are you sure you can't replicate these errors and solve them yourself on your home computer?

Posted

I'm really sorry about the lot of questions i'm asking. And thank you so

much for the help. It's very useful.

I've solved this new error, but same 500 error appeared. I've also run the

code in my pc, and works fine (same with other host)

Posted

You're fine. I don't mind helping people. My strategy is usually to teach people how to solve their own issues though rather than doing it for them. I guess if you really can't get any of these errors to appear on your home pc I'll just keep posting error logs for you.

 

[Tue Aug 29 20:13:07.712575 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] mod_wsgi (pid=21691): Target WSGI script '/home/susoft1/public_html/flask/flask.wsgi' cannot be loaded as Python module.

[Tue Aug 29 20:13:07.712681 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] mod_wsgi (pid=21691): Exception occurred processing WSGI script '/home/susoft1/public_html/flask/flask.wsgi'.

[Tue Aug 29 20:13:07.713713 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] Traceback (most recent call last):

[Tue Aug 29 20:13:07.713790 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] File "/home/susoft1/public_html/flask/flask.wsgi", line 7, in <module>

[Tue Aug 29 20:13:07.713818 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] from views import app as application

[Tue Aug 29 20:13:07.713839 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] File "/home/susoft1/public_html/flask/views.py", line 5, in <module>

[Tue Aug 29 20:13:07.713847 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] import forms

[Tue Aug 29 20:13:07.713862 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] File "/home/susoft1/public_html/flask/forms.py", line 2, in <module>

[Tue Aug 29 20:13:07.713869 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] from wtforms import Form

[Tue Aug 29 20:13:07.713906 2017] [wsgi:error] [pid 21691:tid 140299615590144] [client x.x.x.x:53802] ModuleNotFoundError: No module named 'wtforms'

Guest
This topic is now closed to further replies.

×
×
  • Create New...