Re: Troubleshooting wsgi file

Tom Ekberg <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <CO3PR08MB7957D89E3F4448FD9E18C62FCA869@CO3PR08MB7957.namprd08.prod.outlook.com>
Ralf,

This is an Ubuntu 22.04 system. I ran the wsgi.py from the python interpreter command line:

>>> import wsgi
>>> wsgi.app
<roundup.cgi.wsgi_handler.RequestDispatcher object at 0x7f76ae028be0>
>>> d = dict(PATH_INFO='/', REQUEST_METHOD='GET')
>>> d['wsgi.input'] = ''
>>> >>> wsgi.application(d, '')
[]

I should delete the #! line since none of the other trackers have it. I looked at wsgi.so (cat /usr/lib/apache2/modules/mod_wsgi.so | strings | sort | uniq | less) and was glad to see 'libpython3.10.0' as one of the strings. This must be how the python version is determined.

I created an environment 'tracker' in which wsgi.py outputs HTML, formatting python's os.environ and the wsgi's application function's environ parameter in a table. I also output the python version string, which is '3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]'. This tracker doesn't use roundup, but it uses wsgi.py like the other tracker I was testing with (it_test).

Tom Ekberg
Senior Computer Specialist
Department of Laboratory Medicine and Pathology
4th Floor, Pat Steel Building, currently WFH
Home: (253) 561-2509
Email: [email protected]


-----Original Message-----
From: Ralf Schlatterbeck <[email protected]> 
Sent: Tuesday, July 12, 2022 2:33 AM
To: [email protected]
Subject: Re: [Roundup-users] Troubleshooting wsgi file

On Mon, Jul 11, 2022 at 04:59:40PM +0000, Tom Ekberg wrote:
> ----- attachment -----
> import sys

On what kind of system is this? If Linux you should put a bang-path into the first line, e.g.,

#!/usr/bin/python3

or whatever the path to your python executable is.

It's interesting that you can run the wsgi script by hand, do you call it explicitly with a python interpreter, e.g.

python3 /path/to/cgiscript

otherwise I would be surprised if it can figure out with which interpreter to run the script?

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]


_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.