500 internal server error

37 views
Skip to first unread message

marco coso

unread,
Jun 3, 2017, 4:14:57 AM6/3/17
to Mezzanine Users
hello
i had a blog with with mezzanine, it was working, then i installed mezzanine-api and follow the instructions fort existing project. But now i always got a 500 internal server error using the browser, and nothing en error.log (in access.log i can see the request).
So i created a new project directly with mezzanine-api, but still i always and only get 500 internal server error, and noting in the log.
No mails with errors, also.
Any help?
i see that often this error is related with missing library, though the copmment are about php site, but anyway, could be some unexpressed requirements of mezzanine-api?
Any ideas?

Melvyn Sopacua

unread,
Jun 3, 2017, 7:13:11 AM6/3/17
to mezzani...@googlegroups.com

On Saturday 03 June 2017 01:14:57 marco coso wrote:

 

> i had a blog with with mezzanine, it was working, then i installed

> mezzanine-api and follow the instructions fort existing project. But

> now i always got a 500 internal server error using the browser, and

> nothing en error.log (in access.log i can see the request).

 

Two possible causes:

1) You have DEBUG set to off, so no backtrace or error information is generated. You don't have MAIL_ADMINS and other MAIL related Django settings configured correctly, so you don't get mails either.

 

2) Syntax error. This should be exposed by `python manage.py check`.

 

--

Melvyn Sopacua

Marcello Console

unread,
Jun 3, 2017, 12:19:41 PM6/3/17
to mezzani...@googlegroups.com
Hi, thank you for your support Melvyn .
As far as syntax error: i run python manage.py check and it says it's ok.
As for debug: it was set to True
As far as for mail_admins: from the shell i got an error, but it was
becouse google blocked it. I solved it on google panel and then try
successsfully mail_admins() from the shell.
Then i tried to open the site with browser, got the usual 500 internal
server error, but no mail to admins yet. I then set DEBUG to false and
repeat:same result, no mail to admins.
Could i use the django shell to make some test to investigate?
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/ifmC6Di0siY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Melvyn Sopacua

unread,
Jun 3, 2017, 4:19:26 PM6/3/17
to mezzani...@googlegroups.com

On Saturday 03 June 2017 18:19:37 Marcello Console wrote:

> Hi, thank you for your support Melvyn .

> As far as syntax error: i run python manage.py check and it says it's

> ok. As for debug: it was set to True

> As far as for mail_admins: from the shell i got an error, but it was

> becouse google blocked it. I solved it on google panel and then try

> successsfully mail_admins() from the shell.

> Then i tried to open the site with browser, got the usual 500 internal

> server error, but no mail to admins yet. I then set DEBUG to false

> and repeat:same result, no mail to admins.

> Could i use the django shell to make some test to investigate?

 

Yes.

>>> from django.test import Client

>>> c = Client()

>>> c.get('/')

<TemplateResponse status_code=200, "text/html; charset=utf-8">

>>> len(c.get('/').content)

5307

 

etc.

But this assumes the error is in the source. If the error is in the WSGI layer, this won't help.

What is your webserver + WSGI server stack?

--

Melvyn Sopacua

marco coso

unread,
Jun 5, 2017, 4:25:37 PM6/5/17
to Mezzanine Users
 
if call from browser, i got a

TemplateDoesNotExist at /api/posts

django_filters/rest_framework/form.htm

if called through wget i get
{"count":0,"next":null,"previous":null,"results":[]}
but there are 2 pposts
Reply all
Reply to author
Forward
0 new messages