Something has likely become corrupt in your virtualenv. I'd try creating a new one. This is not a but with the pserve code itself but rather your environment.
On Thu, Jun 23, 2016 at 4:02 PM, Chris Shenton <[email protected]> wrote: > I've been using "pserve --reload myenv.ini" forever and recently the flags > stopped working. Perhaps it's me, or perhaps I didn't pin versions in my > setup.py file, but the "--reload" and other flags which used to work with > pserve are no longer recognized. > > My .ini has: > > [server:main] > use = egg:waitress#main > host = 0.0.0.0 > port = 54321 > > > I tried pinning the versions and saw this on pyramid==1.6.1 and today on > pyramid==1.7. > > ``` > ./.venv3/bin/pserve --reload chris.ini > Starting subprocess with file monitor > Traceback (most recent call last): > File "./.venv3/bin/pserve", line 9, in <module> > load_entry_point('pyramid==1.7', 'console_scripts', 'pserve')() > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/pyramid-1.7-py3.4.egg/pyramid/scripts/pserve.py", > line 60, in main > return command.run() > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/pyramid-1.7-py3.4.egg/pyramid/scripts/pserve.py", > line 371, in run > global_conf=vars) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/pyramid-1.7-py3.4.egg/pyramid/scripts/pserve.py", > line 406, in loadapp > return loadapp(app_spec, name=name, relative_to=relative_to, **kw) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", > line 247, in loadapp > return loadobj(APP, uri, name=name, **kw) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", > line 272, in loadobj > return context.create() > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", > line 710, in create > return self.object_type.invoke(self) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", > line 146, in invoke > return fix_call(context.object, context.global_conf, > **context.local_conf) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/util.py", > line 55, in fix_call > val = callable(*args, **kw) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/messagem8/__init__.py", > line 54, in main > config.scan() > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/pyramid-1.7-py3.4.egg/pyramid/config/__init__.py", > line 976, in scan > ignore=ignore) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/.venv3/lib/python3.4/site-packages/venusian-1.0-py3.4.egg/venusian/__init__.py", > line 205, in scan > __import__(modname) > File > "/Users/chris/Projects/vstudios/MessageM8/messagem8/messagem8/scripts/render_template.py", > line 41, in <module> > body = open(template_file).read() > FileNotFoundError: [Errno 2] No such file or directory: '--reload' > ``` > > Trying other flags has the same failure: > > ./.venv3/bin/pserve --browser chris.ini > [...] > FileNotFoundError: [Errno 2] No such file or directory: '--browser' > > Flipping order, same problem: > > ./.venv3/bin/pserve chris.ini --reload > [...] > FileNotFoundError: [Errno 2] No such file or directory: '--reload' > > I've tried it by drilling down to the 'pserve' script in the Pyramid > distribution and see the same thing: > > python > ./.venv3/lib/python3.4/site-packages/pyramid-1.7-py3.4.egg/pyramid/scripts/pserve.py > --reload chris.ini > [...] > FileNotFoundError: [Errno 2] No such file or directory: '--reload' > > Its as if the optparse in pserve.py isn't parsing options properly but > that seems unlikely to me. > > If nobody else is seeing this (nothing found in searches), do you have any > ideas what I'm doing wrong? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/493bf640-0c49-4dab-ae8c-206469b6eac1%40googlegroups.com > <https://groups.google.com/d/msgid/pylons-discuss/493bf640-0c49-4dab-ae8c-206469b6eac1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwHayG1d7Z1af2LhvUAOE2XFVH1uGVbeHV6jvBGtJZj8bw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
