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

wsgi=off -> FileNotFoundError: [Errno 2] No such file or directory: '/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/off' #115

Open
zopyx opened this issue May 29, 2019 · 2 comments

Comments

@zopyx
Copy link
Member

zopyx commented May 29, 2019

plone.recipe.zope2instance = 6.2.1, Plone 5.2

Setting wsgi=off generates a messy installation:

/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/Zope-4.0b10-py3.7.egg/Zope2/Startup/serve.py:306: DeprecationWarning: 'U' mode is deprecated
Traceback (most recent call last):
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/parts/wsgi.py/bin/interpreter", line 307, in <module>
    exec(compile(__file__f.read(), __file__, "exec"))
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/Zope-4.0b10-py3.7.egg/Zope2/Startup/serve.py", line 219, in <module>
    sys.exit(main() or 0)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/Zope-4.0b10-py3.7.egg/Zope2/Startup/serve.py", line 216, in main
    return command.run()
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/Zope-4.0b10-py3.7.egg/Zope2/Startup/serve.py", line 178, in run
    relative_to=base, global_conf=vars)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/Zope-4.0b10-py3.7.egg/Zope2/Startup/serve.py", line 211, in loadserver
    server_spec, name=name, relative_to=relative_to, **kw)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/PasteDeploy-2.0.1-py3.7.egg/paste/deploy/loadwsgi.py", line 261, in loadserver
    return loadobj(SERVER, uri, name=name, **kw)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/PasteDeploy-2.0.1-py3.7.egg/paste/deploy/loadwsgi.py", line 277, in loadobj
    global_conf=global_conf)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/PasteDeploy-2.0.1-py3.7.egg/paste/deploy/loadwsgi.py", line 302, in loadcontext
    global_conf=global_conf)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/PasteDeploy-2.0.1-py3.7.egg/paste/deploy/loadwsgi.py", line 323, in _loadconfig
    loader = ConfigLoader(path)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/eggs/PasteDeploy-2.0.1-py3.7.egg/paste/deploy/loadwsgi.py", line 399, in __init__
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ajung/sandboxes/onkopedia_buildout-plone5-python3.7/off'

@zopyx
Copy link
Member Author

zopyx commented May 29, 2019

The correct way to use the ZServer is to omit the wsgi option alltogether rather than using wsgi=off ...perhaps the documentation should be more explicit about how to switch between ZServer vs. WSGI

@pbauer
Copy link
Member

pbauer commented May 29, 2019

That seems like a bug in https://github.com/plone/plone.recipe.zope2instance/blob/master/src/plone/recipe/zope2instance/recipe.py#L117

Since @datakurre is working on porting ZServer to Python 3 it makes sense to keep the option wsgi = off even in Python 3 since in the future you could be able to use eitehr wsgo or ZServer in Python 3. Until then plone.recipe.zope2instance should ignore the setting when running in Python 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants