View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006457ParaView(No Category)public2008-02-27 15:062009-05-13 13:59
ReporterKen Moreland 
Assigned ToBerk Geveci 
PriorityhighSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target Version3.4Fixed in Version3.4 
Summary0006457: Programmable filter does not work with "plain" Python
DescriptionIf you set up your paths correctly, it is possible to script ParaView with the basic python executable (as opposed to pvpython). However, one feature that never seems to work is the programmable filter. Whenever the programmable filter is created from the basic python executable, it cannot import the ParaView module.

The same process works fine in pvpython.
TagsNo tags attached.
Project
Topic Name
Type
Attached Files

 Relationships

  Notes
(0011043)
Berk Geveci (administrator)
2008-04-02 16:23

I cannot reproduce this on my Mac. I have the following:

I am running paraview from the build tree. My Python path is:
/Users/berk/Work/paraview3-build/bin:/Users/berk/Work/paraview3-build/Utilities/VTKPythonWrapping

When I run the following script using python, it all works fine.

from paraview import servermanager

servermanager.Connect()

source = servermanager.sources.ProgrammableSource()
source.GetProperty("Script").SetElement(0, """
from paraview import vtk
from paraview import servermanager
""")
source.UpdatePipeline()
(0011233)
Greg Weirs (developer)
2008-04-09 19:22

In this example, I don't think the programmable filter script is being executed. When I add a print statement to it, nothing is printed. If I try to import "utils" rather than "util", there are no complaints.

In the first three lines of the python script I set the path explicitly, rather than relying on the PYTHONPATH.


import sys
sys.path.insert(0,'/usr/local/building/Paraview3/Utilities/VTKPythonWrapping')
sys.path.insert(0,'/usr/local/building/Paraview3/bin')

from paraview import servermanager

servermanager.Connect()


source = servermanager.sources.ProgrammableSource()
source.GetProperty("Script").SetElement(0, """
import sys
print "sys.path = ", sys.path

from paraview import vtk
from paraview import util
from paraview import servermanager
""")
source.UpdatePipeline()
(0011428)
Alan Scott (manager)
2008-04-17 20:51

Closed, as per Berk.

 Issue History
Date Modified Username Field Change
2008-02-27 15:06 Ken Moreland New Issue
2008-03-18 18:59 Alan Scott Priority normal => high
2008-03-19 20:01 Berk Geveci Status backlog => tabled
2008-03-19 20:01 Berk Geveci Assigned To => Berk Geveci
2008-03-19 20:02 Berk Geveci Target Version => Python support
2008-04-02 16:23 Berk Geveci Note Added: 0011043
2008-04-02 16:23 Berk Geveci Status tabled => @20@
2008-04-09 19:22 Greg Weirs Note Added: 0011233
2008-04-17 17:18 Berk Geveci Status @20@ => @80@
2008-04-17 17:18 Berk Geveci Resolution open => no change required
2008-04-17 20:51 Alan Scott Status @80@ => closed
2008-04-17 20:51 Alan Scott Note Added: 0011428
2009-05-13 13:58 Utkarsh Ayachit Target Version Python support => 3.4
2009-05-13 13:59 Utkarsh Ayachit Fixed in Version => 3.4
2011-06-16 13:10 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team