question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

from cherrypy import wsgiserver -> ImportError: cannot import name wsgiserver

See original GitHub issue
  • I’m submitting a … [x] bug report [ ] feature request [ ] question about the decisions made in the repository

  • What is the current behavior?

>>> from cherrypy import wsgiserver
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name wsgiserver
  • What is the expected behavior? Using the latest version of cherrypy I’m expecting to be able to perform this import. I could temporarily resolve the issue going back to version 8.9.0. But I’m wondering if there any better solution.

  • Please tell us about your environment:

  • Python version: 2.7.10
  • OS: macOS Sierra
  • Browser: Opera

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
webknjazcommented, May 5, 2017

No @DWilches, the generic solution is:

try:
    from cheroot.wsgi import Server as WSGIServer
except ImportError:
    from cherrypy.wsgiserver import CherryPyWSGIServer as WSGIServer
2reactions
dwilchescommented, May 31, 2020

So the solution is to not use:

from cherrypy import wsgiserver

But instead:

import wsgiserver
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - ImportError: cannot import name wsgiserver
CherryPy moved wsgiserver to cheroot in 2017. http://docs.cherrypy.dev/en/latest/history.html#v9-0-0. So now you need to import it like this ...
Read more >
[bottlepy] bottle with current (10.*) cherrypy
File "C:\opt\Python27\lib\site-packages\bottle.py", line 2787, in run from cherrypy import wsgiserver ImportError: cannot import name wsgiserver
Read more >
lib/cherrypy/cherrypy/wsgiserver/ssl_builtin.py - Google Git
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, ......
Read more >
https://strike.scec.org/csep/cherrypy/cherrypy/wsg...
Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def ...
Read more >
ImportError: No module named wsgiserver - Google Groups
I'm using rev 161 from subversion and running into what I think is an install problem. (Platform Gentoo, python 2.5). Does anyone have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found