Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CherryPy server issue #975

Open
soumendrak opened this issue May 27, 2017 · 5 comments · May be fixed by #1348
Open

CherryPy server issue #975

soumendrak opened this issue May 27, 2017 · 5 comments · May be fixed by #1348

Comments

@soumendrak
Copy link

Throws the following exception while running on cherrypy server.

C:\Users\username\AppData\Local\Continuum\Anaconda2\lib\pkgutil.py:186: ImportWarning: Not importing directory 'C:\Users\username\AppData\Local\Continuum\Anaconda2\lib\site-packages\paste': missing __init__.py
  file, filename, etc = imp.find_module(subname, path)
C:\Users\username\AppData\Local\Continuum\Anaconda2\lib\pkgutil.py:186: ImportWarning: Not importing directory 'c:\users\username\appdata\local\continuum\anaconda2\lib\site-packages\paste': missing __init__.py
  file, filename, etc = imp.find_module(subname, path)
Traceback (most recent call last):
  File "server.py", line 9, in <module>
    run(host='localhost', port='8080', server='cherrypy', debug=True)
  File "C:\Users\username\AppData\Local\Continuum\Anaconda2\lib\site-packages\bottle.py", line 3127, in run
    server.run(app)
  File "C:\Users\username\AppData\Local\Continuum\Anaconda2\lib\site-packages\bottle.py", line 2787, in run
    from cherrypy import wsgiserver
ImportError: cannot import name wsgiserver

As per the link in CherryPy github, the import should be changed to

try:
    from cheroot.wsgi import Server as WSGIServer
except ImportError:
    from cherrypy.wsgiserver import CherryPyWSGIServer as WSGIServer
@pepelisu
Copy link
Contributor

I am not sure it is an issue, in the last version 0.13 dev on github you have to use cheroot adapter instead of cherrypy.
If you are using cherrypy >0.9 the later will fail, but the former will work. I think it is still in the code for retro compatibility reasons with old cherrypy (but not sure if this is needed).

mark-grimes pushed a commit to mark-grimes/ethoscope that referenced this issue Jun 19, 2017
The latest version of CherryPy is not compatible with the latest version of Bottle. See bottlepy/bottle#975.
mark-grimes pushed a commit to mark-grimes/ethoscope that referenced this issue Jun 24, 2017
The latest version of CherryPy is not compatible with the latest version of Bottle. See bottlepy/bottle#975.
mark-grimes pushed a commit to mark-grimes/ethoscope that referenced this issue Jun 26, 2017
The latest version of CherryPy is not compatible with the latest version of Bottle. See bottlepy/bottle#975.
@iloveluce
Copy link

There hasn't been a release in over a year now meaning there's still no stable release with those changes (mainly switching over to Cheroot). Is there any timeline on the next release?

@hartwork
Copy link
Contributor

hartwork commented Apr 6, 2018

Looks like a duplicate of #934 to me.

@dimyme
Copy link

dimyme commented Oct 14, 2018

line 3271 fixed for me:

        # from cherrypy   import           wsgiserver                                  # This will fail for CherryPy >= 9                                   ###    TODO
        from cheroot.wsgi import Server as WSGIServer
        self.options['bind_addr'] = (self.host, self.port)
        self.options['wsgi_app'] = handler

        certfile = self.options.get('certfile')
        if certfile:
            del self.options['certfile']
        keyfile = self.options.get('keyfile')
        if keyfile:
            del self.options['keyfile']

        server =              WSGIServer(**self.options)  ################# ###     wsgiserver.CherryPyWSGIServer(**                  WSGIServer.CherryPyWSGIServer(**

pklaus added a commit to pklaus/local-blog that referenced this issue Sep 23, 2020
@mrdc
Copy link

mrdc commented Dec 10, 2020

@soumendrak
Unfortunately, it's not working for Bottle 0.12.19.

@waghanza waghanza linked a pull request Aug 22, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants