Forum

You are not logged in.

#1 17-06-2017 11:11:57

Jose Gago
Membre
Registered: 17-06-2017
Posts: 2

Python. Error after the migration of infrastructure

After the migration I get the following error on my site:


[Sat Jun 17 11:50:35 2017] [info] mod_fcgid: server callcenter-conecta6.com:/home/conecta6-django/django_venta2015/public/django.fcgi(316705) started
Traceback (most recent call last):
File "/home/conecta6-django/django_venta2015/public/django.fcgi", line 4, in <module>
from django.core.servers.fastcgi import runfastcgi
ImportError: No module named django.core.servers.fastcgi
[Sat Jun 17 11:50:35 2017] [warn] [client 185.184.172.220] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Jun 17 11:50:35 2017] [error] [client 185.184.172.220] Premature end of script headers: django.fcgi
[Sat Jun 17 11:50:35 2017] [info] mod_fcgid: server callcenter-conecta6.com:/home/conecta6-django/django_venta2015/public/django.fcgi(316718) started
Traceback (most recent call last):
File "/home/conecta6-django/django_venta2015/public/django.fcgi", line 4, in <module>
from django.core.servers.fastcgi import runfastcgi
ImportError: No module named django.core.servers.fastcgi
[Sat Jun 17 11:50:35 2017] [warn] [client 185.184.172.220] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://callcenter-conecta6.com/admin
[Sat Jun 17 11:50:35 2017] [error] [client 185.184.172.220] Premature end of script headers: django.fcgi, referer: http://callcenter-conecta6.com/admin
[Sat Jun 17 11:50:38 2017] [info] mod_fcgid: process /home/conecta6-django/django_venta2015/public/django.fcgi(316718) exit(communication error), terminated by calling exit(), return code: 1
[Sat Jun 17 11:50:38 2017] [info] mod_fcgid: process /home/conecta6-django/django_venta2015/public/django.fcgi(316705) exit(communication error), terminated by calling exit(), return code: 1


My django.fcgi is:


#!/usr/bin/python
import os
import sys
from django.core.servers.fastcgi import runfastcgi

_PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, _PROJECT_DIR)
sys.path.insert(0, os.path.dirname(_PROJECT_DIR))

_PROJECT_NAME = _PROJECT_DIR.split('/')[-1]
os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % _PROJECT_NAME

runfastcgi(method="threaded", daemonize="false")

What happen?

Offline

#2 18-06-2017 09:32:24

@Cyril
Staff
From: Paris
Registered: 06-02-2007
Posts: 5,545
Website

Re: Python. Error after the migration of infrastructure

You need to install Django (among other required libraries by your application, most likely).

Offline

Board footer

Powered by FluxBB