5

I'm new to Python, and am developing a test application using the Pyramid Framework.

Today, for reasons unclear, the pserve command used to start the waitress server stopped functioning. Running: pserve development.ini results in the message: invalid command name 'development.ini', although it was working fine previously.

I've verified that which pserve is correct, and which python points to the Python of the virtualenv I created for the project. The path to development.ini is also correct.

I've searched all over the web and there doesn't seem to be any documentation on this. Does anyone have experience with this? How can I go about debugging the issue? Any help would be greatly appreciated. Thanks.

tshepang
  • 12,111
  • 21
  • 91
  • 136
bibs
  • 1,226
  • 2
  • 11
  • 14
  • 1
    What output do you get if you just run `pserve`? – Amber Aug 08 '12 at 04:00
  • @Amber: "You must give a config file" – bibs Aug 08 '12 at 04:08
  • And what's the output of `pserve --help`? – Martijn Pieters Aug 08 '12 at 08:50
  • @Martijn Pieters, pserve --help appears to work as intended: `Usage: pserve config_uri [start|stop|restart|status] [var=value] This command serves a web application that uses a PasteDeploy configuration file for the server and application.` etc. etc. – bibs Aug 08 '12 at 12:48
  • 1
    Weird, actually, because the output you give (`invalid command name`) is completely inconsistent with the source code of `pserve`. How comfortable are you with the python pdb debugger? I'd edit `pserve` and insert a `set_trace()` and just follow the code from there. – Martijn Pieters Aug 08 '12 at 12:58
  • Sounds like a good learning exercise. I'll give it a go. Thanks for your help. – bibs Aug 08 '12 at 13:42
  • Maybe something wrong with `[server:main]` section in development.ini? – Aleksandr Dezhin Aug 10 '12 at 00:14
  • 1
    @bibs So, did you find the problem ? Can you give us the answer ? – madjar Nov 08 '12 at 10:13

0 Answers0