Error code: Unhandled Exception

Error running WSGI application

   <pre>File "/home/danguddemi/.local/lib/python3.6/site-packages/concurrent/futures/", line 381

     raise exception_type, self._exception, self._traceback

Traceback (most recent call last):
  File "/home/danguddemi/mysite/", line 1, in <module>
    from flask import Flask, render_template, request

  File "/usr/local/lib/python3.6/dist-packages/flask/", line 19, in <module>
    from jinja2 import Markup, escape

  File "/usr/local/lib/python3.6/dist-packages/jinja2/", line 81, in <module>

  File "/usr/local/lib/python3.6/dist-packages/jinja2/", line 77, in _patch_async
    from jinja2.asyncsupport import patch_all

  File "/usr/local/lib/python3.6/dist-packages/jinja2/", line 13, in <module>
    import asyncio

  File "/usr/lib/python3.6/asyncio/", line 21, in <module>
    from .base_events import *

  File "/usr/lib/python3.6/asyncio/", line 17, in <module>
    import concurrent.futures

  File "/home/danguddemi/.local/lib/python3.6/site-packages/concurrent/futures/", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,

  File "/home/danguddemi/.local/lib/python3.6/site-packages/concurrent/futures/", line 381
    raise exception_type, self._exception, self._traceback
SyntaxError: invalid syntax

Not exactly sure what is happening here. I'm not running in a virtual environment and I am pretty sure that the WSGI file is set up correctly

[edited by admin for formatting]

A syntax error usually means there's a mismatch between the code you're trying to run, and the python version that's running it. What Python version is your webapp using? And could the code that you installed with --user be the wrong version somehow?

A virtualenv might be a good way to get more clarity on what's installed where...