bad gateway error from nginx when using GET method with flask and uwsgi

I am trying to build a simple webservice with flask. I have a docker network with nginx as reverse proxy, and this works to make flask return html as long as I am not asking for a parameter (see this post: creating a webservice in flask that queries a Mysql database and returns json). I have been reading a lot before posting this question and suspect it's got to do with the uwsgi config ( that part I understand close to nothing about). Please can anyone help?

this is app.ini:

wsgi-file = run.py
callable = app
socket = :5001
processes = 4
threads = 2
master = true
chmod-socket = 777
vacuum = true
die-on-term = true

This is the docker-compose.yml file:

version: "3.3"

services:

  flask:
    build: ./flask
    container_name: flask
    restart: always
    environment:
      - APP_NAME=Flask_webservice
    expose:
      - 5001

  nginx:
    build: ./nginx
    container_name: nginx
    restart: always
    ports:
      - "80:80"

my (slightly off) attempt at testing uwsgi:

(env) sanardi@ubuntu:~/app/flask$ uwsgi --socket 0.0.0.0:5001 --protocol=http -w wsgi:app
*** Starting uWSGI 2.0.18 (64bit) on [Fri May 22 13:20:34 2020] ***
compiled with version: 7.5.0 on 18 May 2020 17:30:13
os: Linux-4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/sanardi/app/flask
detected binary path: /home/sanardi/app/flask/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 11902
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:5001 fd 3
Python version: 3.6.9 (default, Apr 18 2020, 01:56:04)  [GCC 8.4.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x55fc7e1ac7b0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72904 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
ModuleNotFoundError: No module named 'wsgi'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 14767, cores: 1)