Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

564
Views
ValueError: "django.core.wsgi.get_wsgi_application()" no se pudo importar

Estaba configurando todas las rutas en mi archivo web.config y configurando todo en IIS (en Windows Server 2012 R2). Cuando terminé, inicié el servidor y accedí al sitio web. Pero al hacerlo, recibí el siguiente mensaje de error:

 Error occurred while reading WSGI handler: Traceback (most recent call last): File "C:\inetpub\wwwroot\djangoapp\wfastcgi.py", line 711, in main env, handler = read_wsgi_handler(response.physical_path) File "C:\inetpub\wwwroot\djangoapp\wfastcgi.py", line 568, in read_wsgi_handler return env, get_wsgi_handler(handler_name) File "C:\inetpub\wwwroot\djangoapp\wfastcgi.py", line 551, in get_wsgi_handler raise ValueError('"%s" could not be imported' % handler_name) ValueError: "django.core.wsgi.get_wsgi_application()" could not be imported StdOut: StdErr:

Web.config (archivo):

 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="Python FastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Python34\python.exe|C:\inetpub\wwwroot\djangoapp\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" /> </handlers> </system.webServer> <appSettings> <add key="WSGI_HANDLER" value="django.core.wsgi.get_wsgi_application()" /> <add key="PYTHONPATH" value="C:\Python34\python.exe" /> <add key="WSGI_RESTART_FILE_REGEX" value=".*((\.py)|(\.config))$" /> <add key="DJANGO_SETTINGS_MODULE" value="djangoapp.settings" /> </appSettings> </configuration>

No entiendo por qué se produce este error. ¿Alguien tiene idea de cómo resolver esto?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Veo este problema mucho en la web. El problema que tiene aquí es que tiene 2 versiones de Python en su máquina. Asegúrese de tener todo instalado para ambas versiones. Por ejemplo, Python versión 3.4: py -m pip install django y para Python versión 3.6: solo pip install django de acuerdo con cómo se configuran las variables de entorno, por supuesto. Por favor, asegúrese de que todo esté bien descargado. También tenga en cuenta que para ambas versiones también debe ingresar estos comandos para que funcione: Para la versión 3.6 (en mi caso):

 pip install --upgrade wheel pip install wfastcgi wfastcgi-enable

Y para la versión 3.4 (en mi caso):

 py -m pip install --upgrade wheel py -m pip install wfastcgi wfastcgi-enable

Tenga en cuenta que ambas versiones tienen su propio wfastcgi.

about 4 years ago · Santiago Trujillo Report

0

Aquí está la diferencia entre nosotros.

 <add key="WSGI_HANDLER" value="django.core.handlers.wsgi.WSGIHandler()" /> <add key="PYTHONPATH" value="[PATH_OF_DJANGOAPP]" />
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!