disabling wsgi interface fails under python3
See original GitHub issueOriginally reported by: Tim Miller (Bitbucket: lashni, GitHub: Unknown)
http://docs.cherrypy.org/en/latest/advanced.html#no-need-for-the-wsgi-interface
Error is encountered when the example code from the link above is run under a python 3.4.3 virtualenv on archlinux, traceback triggers when the server is accessed. Error doesn’t occur with python 2.7.10.
Happens with both current head and CherryPy 3.8.0.
[19/Jul/2015:17:41:01] ENGINE Listening for SIGUSR1.
[19/Jul/2015:17:41:01] ENGINE Listening for SIGTERM.
[19/Jul/2015:17:41:01] ENGINE Listening for SIGHUP.
[19/Jul/2015:17:41:01] ENGINE Bus STARTING
CherryPy Checker:
The Application mounted at '' has an empty config.
[19/Jul/2015:17:41:01] ENGINE Started monitor thread '_TimeoutMonitor'.
[19/Jul/2015:17:41:01] ENGINE Started monitor thread 'Autoreloader'.
[19/Jul/2015:17:41:01] ENGINE Serving on http://127.0.0.1:8080
[19/Jul/2015:17:41:01] ENGINE Bus STARTED
[19/Jul/2015:17:41:05] NATIVE_ADAPTER Traceback (most recent call last):
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cpnative_server.py", line 27, in respond
sn = cherrypy.tree.script_name(req.uri or "/")
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cptree.py", line 257, in script_name
path = path[:path.rfind("/")]
TypeError: 'str' does not support the buffer interface
ValueError('invalid literal for int() with base 10: "b\'5"',)
Traceback (most recent call last):
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cpnative_server.py", line 27, in respond
sn = cherrypy.tree.script_name(req.uri or "/")
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cptree.py", line 257, in script_name
path = path[:path.rfind("/")]
TypeError: 'str' does not support the buffer interface
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/wsgiserver/wsgiserver3.py", line 1068, in communicate
req.respond()
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/wsgiserver/wsgiserver3.py", line 856, in respond
self.server.gateway(self).respond()
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cpnative_server.py", line 88, in respond
self.send_response(s, h, b)
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/_cpnative_server.py", line 101, in send_response
req.send_headers()
File "/home/lashni/dev/serve/lib/python3.4/site-packages/cherrypy/wsgiserver/wsgiserver3.py", line 912, in send_headers
status = int(self.status[:3])
ValueError: invalid literal for int() with base 10: "b'5"
Issue Analytics
- State:
- Created 8 years ago
- Comments:40 (29 by maintainers)
Top Results From Across the Web
Disable mod_wsgi starting new threads for Flask script
Very thorough! Set it up to run in daemon mode, but only managed to achieve what i wanted when i set both the...
Read more >Deployment — Webware for Python 3 3.0.3 documentation
Webware for Python 3 uses the Web Server Gateway Interface (WSGI) which allows deploying Webware apps with any available WSGI server.
Read more >cgi — Common Gateway Interface support ... - Python Docs
Support module for Common Gateway Interface (CGI) scripts. This module defines a number of utilities for use by CGI scripts written in Python....
Read more >12.4. Web Server Gateway Interface - Runestone Academy
From our perspective as application builders, WSGI is very simple. It has the following four features: WSGI applications are callable python objects (functions ......
Read more >How to Deploy Python WSGI Applications Using uWSGI Web ...
You still need your application and database functioning well in order to have Nginx serve clients responses that are not error messages. Using ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyway, this needs a real reproducer and a separate issue. The info provided isn’t sufficient to conclude any relation to this change.
@webknjaz Done as #1784.