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

  • Home
  • SEARCH
  • 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 6834713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:08:45+00:00 2026-05-26T23:08:45+00:00

I am trying to use th subprocess module along with the Popen class to

  • 0

I am trying to use th subprocess module along with the Popen class to create and run a process. Up until now, I always succeeded calling any program I wanted.

Now I am trying to call paraview (version 3.8.1) with a python script attached to it as a parameter like so:

paraview --script=script.py

If I run this command from console it works just fine. If I try to run it with my Popen class it fails with the error message:

/home/woltan/local/lib/python2.7/site.py:157: Warning: 'with' will become a reserved keyword in Python 2.6
'import site' failed; use -v for traceback
/home/woltan/local/lib/python2.7/linecache.py:127: Warning: 'with' will become a reserved keyword in Python 2.6
/home/woltan/local/lib/python2.7/site.py:157: Warning: 'with' will become a reserved keyword in Python 2.6
'import site' failed; use -v for traceback
ERROR: In /home/kitware/Kitware/ParaView-3.8.1/source/Utilities/VTKPythonWrapping/Executable/vtkPVPythonInteractiveInterpretor.cxx, line 75
vtkPVPythonInteractiveInterpretor (0x124e9d0): Failed to locate the InteractiveConsole object.

Paraview itself is starting up. But is the error message due to the fact, that paraview itself has a python interpreter which it is using? Or can I tweak my Popen calling routine which looks like this:

p = subprocess.Popen("paraview --script=script.py", bufsize = -1, shell = True)

How can it be, that a process can be created from console but not with the Popen-call from above?

Edit

I downloaded and installed a paraview version where python 2.7 is running inside (and not python 2.5 of the version I used above) and the call of Popen works. So this must have something to do with the python version of paraview. The only question remaining is: Why does it even matter when I start a process with Popen?

  • 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-05-26T23:08:46+00:00Added an answer on May 26, 2026 at 11:08 pm

    There are 2 things which are strage:

    1. Normally, this call shouldn’t work at all. As you have shell=False, you would need to use a sequence as 1st parameter:

      p = subprocess.Popen(("paraview", "--script=script.py"), bufsize=-1)
      

      (shell=False is the default.)

    2. You seem to mix several Python versions:

      /home/woltan/local/lib/python2.7/site.py:157: Warning: 'with' will become a reserved keyword in Python 2.6
      

    The said site.py uses the with keyword. That’s ok, because it is intended for Python 2.7. The python version you are running seems to come from Python 2.5. There was no with back in 2.4, and in 2.6 it was already present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the subprocess module with Python 2.6 in order to run
I'm trying to use subprocess.Popen to construct a sequence to grab the duration of
I'm trying to launch an 'rsync' using subprocess module and Popen inside of a
I'm trying to use wget with subprocess . my attempts worked until I tried
I was trying use a set of filter functions to run the appropriate routine,
Trying to use an excpetion class which could provide location reference for XML parsing,
First let me say that I know it's better to use the subprocess module,
I am trying to write a small app that uses the subprocess module. My
Update: When I use the subprocess.call instead of subprocess.Popen , the problem is solved
I am trying to run a script on a Debian server that uses module

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.