2,489 questions
0
votes
0
answers
70
views
How to load environment variables in PythonAnywhere?
I have just finished working on a Flask web application that is using openai SDK.
Locally everything works smoothly, but after uploading the project on PythonAnywhere, the environment variables from ....
1
vote
1
answer
34
views
mod_wsgi doesn't output exception traceback to the httpd error log
Platform:
httpd-2.4.62-1.el9_5.2.x86_64
python3-mod_wsgi-4.7.1-11.el9.x86_64
python3-3.9.21-1.el9_5.x86_64
httpd settings:
WSGIDaemonProcess server.example.com \
processes=2 \
...
0
votes
0
answers
50
views
running two Flask apps through WSGI on Apache Ubuntu Server?
I have 2 apps made in Flask, an API which gets and sends data from an sqlite database. And a Flask web app with a jinja template in a template folder. i want to run both the api and web app on an ...
0
votes
0
answers
13
views
Apache removing spaces before slashes in the PATH of an URI
I cannot find it anywhere, nor in the source code of Apache nor on any page references for this happening, but somehow Apache normalizes URIs
from
http://example.com/my/page /with/space
into
http://...
0
votes
1
answer
438
views
Django WSGI and ASGI
How can I run the ASGI and WSGI protocols separately in my Django project?
This is my project structure.
.
├── chat # <== my app name
│ ├── apps.py
│ ├── consumers.py
│ ├── __init__.py
│ ├─...
0
votes
0
answers
60
views
Running python app 'changedetection' on PythonAnywhere
Has anyone ever used PythonAnywhere to host opensource python program called changedetection?
I'm having trouble with the web app WSGI file, which is the file telling the web app where to find the app ...
1
vote
0
answers
49
views
503 error when running a python application on planet hoster / N0C
I'm trying to create a simple python application on planet hoster which use the N0C interface (instead of cpanel), I didn't add any code (run.py contains only the template for the 200 ok message)
I ...
0
votes
1
answer
46
views
Apache: WSGI not routing
I am trying to use WSGI with a URL that I need to be able to POST to under Apache 2 (using flask). I am able to run my .wsgi independently of Apache (python cfg.wsgi) and it handles GET and POST ...
0
votes
0
answers
88
views
Error 500 - Internal Server Error on Django on Production server
I’m facing an issue with my Django application running in production on CPanel, and I'm using Passenger for WSGI. The application works fine on the local machine but on the live server it only works ...
0
votes
0
answers
40
views
POST URLs throwing 404s in Flask
First, I'm a sysadmin, not a developer, but I am assisting a developer with setting up a Flask app.
The app works in that it serves content and looks great. However, any time we need to take an action ...
0
votes
1
answer
322
views
uwsgi module not found after Python upgrade
I have a Flask/UWSGI application running on my home server. A recent Ubuntu upgrade deleted Python 3.10 and installed Python 3.12 instead. I've made a new venv and installed the application, but it no ...
0
votes
1
answer
132
views
whitenoise module not found in production
Error:
I ran into this error when trying to deploy my Django app using GAE using these instructions GAE for Django: ModuleNotFoundError: No module named 'whitenoise'.
The error occurs when starting ...
0
votes
1
answer
71
views
WSGI Application - To Accept JSON Payload from and process and send email
I am trying to setup a App in python and wsgi to get some payload from cloud to on-prem and send email eventually.
My Setup includes WSGI & NGINX but for testing purpose I am forming a payload ...
0
votes
1
answer
31
views
init_fs_encoding during deploying django app to apache
i'm trying for hours to deploy a django app on an apache2 and still get following error:
PYTHONHOME = '/home/rickmanns/bar/bar/djenv'
PYTHONPATH = (not set)
program name = 'python3'
isolated = ...
0
votes
1
answer
73
views
problem with apache server displaying index.html instead of flask endpoint
I have the following config files:
/etc/apache2/sites-available/propman.domain.com.conf:
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess propman_proc python-home=/var/www/propman/.venv processes=1 ...
1
vote
0
answers
137
views
can I run my python script using gunicorn and wsgi
I have a Python script which I want to run using Gunicorn. I have created a wsgi file as I am not using any framework. So I have 3 files in my folder: my Python script (app.py), Wsgi file (wsgi.py), ...
0
votes
1
answer
87
views
CSRF verification failed. Request aborted. Origin checking failed
Here is my setup:
localhost (Windows 11)
- Nginx
listening on port 80 and 443, 80 is NOT automatically redirected to 443
each proxy_passed to http://wsgi-server where wsgi-server=127.0.0....
0
votes
0
answers
88
views
Django retrieves old content from the database
I've developed an app using Django 5, tested it on my server and my local, and made it in production on my server. The problem is that when a certain action is taken to write or update a record in the ...
1
vote
1
answer
1k
views
Python opentelemetry wsgi usage with gunicorn / Application Insights
I have the below setup working perfectly in development mode in my django application, so when I run python manage.py runsslserver the application reports perfectly to Application Insights.
from azure....
2
votes
4
answers
1k
views
How to suppress "Invalid HTTP method" error message on gevent flask/wsgi server running HTTP when it gets an HTTPS request
If a confused user of my application accidentally makes an HTTPS call against my "plain" flask server (expecting an HTTP request) running gevent, I get a log message that I dont know how to ...
1
vote
1
answer
224
views
Apache hosted Python Flask web app running in Rocky Linux 9 not able execute shutdown command
I'm new to Python Flask application web hosting, in the web app I'm trying to set functionality to shutdown server once every work is complete. I have built the application in Flask Jinja Python ...
1
vote
0
answers
209
views
Django WSGI and ASGI via Passenger confusion
Hi all I have a dedicated plesk server on the internet running debian 12. I've started experimenting with Django and deploying django apps via apache and Nginx. I have successfully managed to get a ...
0
votes
2
answers
123
views
Add Flask-WSGI routes to DDEV-Drupal project
I have a ddev-Drupal project and want to add web-routing for my python-flask project. Ideally something like this: https://github.com/docker/awesome-compose/tree/master/flask-redis - or maybe with ...
0
votes
1
answer
70
views
Flask won´t run my code and is stuck on index page
I am just finishing this project and i´ve got everything done but eventhough everything seems alright flask server won´t let me through selection on index page :( any ideas? i need this in couple ...
1
vote
0
answers
511
views
AWS Lambda & AWSGI
I have an AWS Lambda function which uses 'import awsgi'. I have uploaded the aws-wsgi & awsgi python dependencies, with other dependencies, to an S3 bucket. Then, uploaded all the dependencies to ...