Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8610155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:03:42+00:00 2026-06-12T04:03:42+00:00

I try to do this by using subprocess in a views.py returnCode = subprocess.call(‘/Users/ivanlw/Projects/C/app’)

  • 0

I try to do this by using subprocess in a views.py

returnCode = subprocess.call('/Users/ivanlw/Projects/C/app') #use the absolute path
print 'returnCode', returnCode

the app file just prints a sentence, it’s normal when I execute it in the terminal

but finally the debug page of django tells me OSError, the Exception Value shows: [Errno 2] No such file or directory

How to solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:03:43+00:00Added an answer on June 12, 2026 at 4:03 am

    You could try this:

    a) check the answer to this question. It shows how to start a subprocess which runs in the background.

    p = subprocess.Popen([sys.executable, '/path/to/script.py'], 
                                        stdout=subprocess.PIPE, 
                                        stderr=subprocess.STDOUT)
    

    b) As the error code states the process does not find the file you want to call. If the path is correct maybe change the permissions on the app file.

    c) Try to start the subprocess via the shell to see whether it also fails from there:

    #start the python shell
    python
    #call the subprocess
    subprocess.call('/Users/ivanlw/Projects/C/app')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this to (try) to validate a 'strong' password in ColdFusion 7. if
I am using this function try to make a request to the server. I
I am using this tutorial to try to replace the default TitleBar with a
I'm using this code and I'm beyond frustration: try { $dbh = new PDO('mysql:dbname='
I try to get this following url using the downloadURL function as follows: http://www.ncbi.nlm.nih.gov/nuccore/27884304
I'm using this piece of code to try and save an image to the
I am currently using code similar to this: try { // IE ONLY var
when using this method public List<Field> getFieldWithoutId(List<Integer> idSections) throws Exception { try { Connection
I am trying to follow this tutorial ( Using-core-plot-in-an-iphone-application ). When I try to
if in a literal object i try to reference a function using this inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.