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

ImportError: No module named wsgiserver2 #31

Open
alensiljak opened this issue Feb 28, 2014 · 8 comments
Open

ImportError: No module named wsgiserver2 #31

alensiljak opened this issue Feb 28, 2014 · 8 comments

Comments

@alensiljak
Copy link

What seems to be the problem here?
Just installed (via easy_install and then through also through pip), run "markdoc init my-wiki", entered the directory and neither "markdoc build" nor "markdoc serve" work.
This is the message on running "markdoc serve":

c:\temp_a\my-wiki>markdoc serve
Traceback (most recent call last):
File "c:\programs\dev\Python27\Scripts\markdoc-script.py", line 9, in
load_entry_point('markdoc==0.6.6', 'console_scripts', 'markdoc')()
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\main.py", line 38, in main
return command(config, args)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\commands.py", line 29, in wrapper
return function(config, args)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\cli\commands.py", line 341, in serve
server = config.server_maker()(app)
File "C:\programs\dev\Python27\lib\site-packages\markdoc-0.6.6-py2.7.egg\markdoc\server.py", line 27, in server_maker
from cherrypy.wsgiserver import CherryPyWSGIServer
File "C:\programs\dev\Python27\lib\site-packages\cherrypy-3.2.5-py2.7-win-amd6
4.egg\cherrypy\wsgiserver__init__.py", line 11, in
from wsgiserver2 import *
ImportError: No module named wsgiserver2

c:\temp_a\my-wiki>

@pybokeh
Copy link

pybokeh commented Apr 1, 2014

I have same error too with Python 2.7 environment:
ImportError: No module named wsgiserver2

But if I install a python 3 environment, it works ok. Seems like a problem when using cherrypy with python 2.7.x

@verdverm
Copy link

any solution or known work arounds? I'm getting this error too

@pierluc-codes
Copy link

@casperlehmann
Copy link

That gave me just another error (See below).

Try installing from source with mercurial. This worked for me:
$ hg clone https://bitbucket.org/cherrypy/cherrypy
$ cd cherrypy
$ python setup.py install
(Taken from the docs: http://docs.cherrypy.org/en/latest/install.html)

Output:


(my_app_venv)root@test:~/my_app# python server.py[08/Jul/2014:02:32:10] ENGINE Bus STARTING[08/Jul/2014:02:32:10] ENGINE Started monitor thread 'Autoreloader'.
[08/Jul/2014:02:32:10] ENGINE Started monitor thread '_TimeoutMonitor'.
[08/Jul/2014:02:32:10] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x7f8c8ee51d10>>
Traceback (most recent call last):
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 205, in publish
output.append(listener(_args, *_kwargs))
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/_cpserver.py", line 167, in start
self.httpserver, self.bind_addr = self.httpserver_from_self()
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/_cpserver.py", line 158, in httpserver_from_self
httpserver = _cpwsgi_server.CPWSGIServer(self)
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/_cpwsgi_server.py", line 43, in init
accepted_queue_timeout=self.server_adapter.accepted_queue_timeout,
TypeError: init() got an unexpected keyword argument 'accepted_queue_size'

[08/Jul/2014:02:32:10] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 243, in start
self.publish('start')
File "/root/my_app/my_app_venv/local/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 223, in publish
raise exc
ChannelFailures: TypeError("init() got an unexpected keyword argument 'accepted_queue_size'",)

[08/Jul/2014:02:32:10] ENGINE Bus STOPPING
[08/Jul/2014:02:32:10] ENGINE HTTP Server None already shut down
[08/Jul/2014:02:32:10] ENGINE Stopped thread 'Autoreloader'.
[08/Jul/2014:02:32:10] ENGINE Stopped thread '_TimeoutMonitor'.
[08/Jul/2014:02:32:10] ENGINE Bus STOPPED
[08/Jul/2014:02:32:10] ENGINE Bus EXITING
[08/Jul/2014:02:32:10] ENGINE Bus EXITED

@andreis
Copy link

andreis commented Jul 15, 2014

@plcstpierre 👍 you beat me to it; that worked for me (ubuntu:14.04)

@thobonho
Copy link

@Laspimon Run into the same issue but I could resolve it by taking wsgiserver2.py version from the zip instead: https://pypi.python.org/pypi/CherryPy/3.6.0

@doubledodge
Copy link

Thanks for your advice @thobonho I have just fixed the same problem re-installing CherryPy from the .zip file (Running the Python 2.7 Spyder2 IDE on a Windows 7 64 bit installation - not my choice, I would rather use Linux of course)

@tiba-noe
Copy link

I've installt it by using the msi-Installer and encountered this error.
Solution was to download the zip, search for the wsgiserver2.py file and place it into C:\Python27\Lib\site-packages\cherrypy\wsgiserver. That worked fine.

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

No branches or pull requests

9 participants