Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 June 18, 2010 18:05:29

Tim S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

subprocess.Popen breaks dev server


Hi Folks,

I have code that does this:

lCommand = lProcess = subprocess.Popen(lCommand, stdin=subprocess.PIPE,stdout=subprocess.PIPE)in a view. When using the dev server, I'm quite often getting a blankpage instead of my HTML, and for each page request the server outputs:Django version 1.2.1, using settings 'dewsbury.settings'
Development server is running athttp://127.0.0.1:8000/Quit the server with CONTROL-C.This is happening on every request. If I comment out the code that doesthe Popen, it works fine.The Popen command is completing fine, I can print out the output on eachrequest, it's just that the dev server is returning a blank page back tothe browser. This is on the 1.2.1 release.I've had a wander around the bugs related to this and the ones I couldfind seems to be closed as duplicate, or closed worksforme.http://code.djangoproject.com/ticket/9286http://code.djangoproject.com/ticket/4953http://code.djangoproject.com/ticket/3712Clues/pointers appreciated!

Cheers,

Tim.

--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 18, 2010 19:13:16

Henrik G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

subprocess.Popen breaks dev server


you may try subprocess.check_call instead of Popen

regards
henrik

>reply to message:
>date: 18.06.2010 19:05:21
>from: "Tim Sawyer" <list.dja...@calidris.co.uk>
>to: django-users@googlegroups.com
>subject: subprocess.Popen breaks dev server
>
>Hi Folks,
>
>I have code that does this:
>
>lCommand =
>lProcess = subprocess.Popen(lCommand, stdin=subprocess.PIPE,
>stdout=subprocess.PIPE)
>
>in a view. When using the dev server, I'm quite often getting a blank
>page instead of my HTML, and for each page request the server outputs:
>
>Django version 1.2.1, using settings 'dewsbury.settings'
>Development server is running athttp://127.0.0.1:8000/>Quit the server with CONTROL-C.
>
>This is happening on every request. If I comment out the code that does
>the Popen, it works fine.
>
>The Popen command is completing fine, I can print out the output on each
>request, it's just that the dev server is returning a blank page back to
>the browser. This is on the 1.2.1 release.
>
>I've had a wander around the bugs related to this and the ones I could
>find seems to be closed as duplicate, or closed worksforme.
>
>http://code.djangoproject.com/ticket/9286>http://code.djangoproject.com/ticket/4953>http://code.djangoproject.com/ticket/3712>
>Clues/pointers appreciated!
>
>Cheers,
>
>Tim.
>
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to django-us...@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 19th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support