markdoc
markdoc copied to clipboard
ImportError: No module named wsgiserver2
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
c:\temp_a\my-wiki>
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
any solution or known work arounds? I'm getting this error too
http://www.chronicles.no/2014/04/cherrypy-no-module-named-wsgiserver2.html
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
@plcstpierre :+1: you beat me to it; that worked for me (ubuntu:14.04)
@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
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)
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.