An easy fix is adding: export PYTHONUSERBASE=/dev/null
to my bash script that sets the LD_LIBRARY_PATH and PYTHONPATH and "wraps" the paraview invocation. I also tried setting PYTHONNOUSERSITE but that did not help. Thanks, Shawn for the discussion and may this help someone else down the line. On 03/07/2018 01:05 PM, Martin Weinberg wrote: > Okay . . . I figured out the problem but not the fix. > > The problem is: I installed some packages with pip, and python is > prepending ~/.local/lib/python2.7/site-packages paths to PYTHONPATH even > when I rewrite the that path in the shell. > > So if I temporarily rename ~/.local/lib/python2.7/site-packages to > something else, the programmable filter works as expected. > > Any idea how to best handle this? > > > On 03/07/2018 09:03 AM, Shawn Waldon wrote: >> The only dependent package I can think of for python filters is numpy, >> which is used in the dataset adapter code (VTK arrays are wrapped to >> be numpy array-like). But that should be installed with the binaries >> and you should get a failed import if it is missing. >> >> Shawn >> >> On Wed, Mar 7, 2018 at 8:57 AM, Martin Weinberg >> <[email protected] <mailto:[email protected]>> wrote: >> >> Thanks. The data is definitely loaded; e.g. I can render with an >> upstream filter. >> >> I wonder of I'm missing some dependent package on the problem >> machine? >> >> >> On March 7, 2018 8:26:13 AM EST, Shawn Waldon >> <[email protected] <mailto:[email protected]>> wrote: >> >> Hi Martin, >> >> My first guess would be that your state file is trying to load >> data that isn't there. Then when you run your programmable >> filter inputs[0] is None and you get this error message. I >> can't think of anything else that could be going wrong with >> that script, especially since it works on one of your machines. >> >> HTH, >> Shawn >> >> On Tue, Mar 6, 2018 at 6:16 PM, Martin Weinberg >> <[email protected] >> <mailto:[email protected]>> wrote: >> >> I have two nearly identical machine running Ubuntu 17.10. >> The both have >> the latest stable Paraview 5.4.1 from the download page >> installed in /opt. >> >> I wrote a wrapper script like this: >> >> >> -------------------------------------------------------------------------------------------------------------------- >> >> #!/bin/bash >> >> # PVHOME=/opt/ParaView-5.4.1-822-g597adef-Qt5-MPI-Linux-64bit >> PVHOME=/opt/ParaView-5.4.1-Qt5-OpenGL2-MPI-Linux-64bit >> >> export PATH=$PVHOME/bin >> export LD_LIBRARY_PATH=$PVHOME/lib/ >> export >> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PVHOME/lib/paraview-5.4/ >> export PYTHONPATH=$PVHOME/lib/python2.7/bin/ >> export >> PYTHONPATH=$PYTHONPATH:$PVHOME/lib/python2.7/site-packages/ >> export >> PYTHONPATH=$PYTHONPATH:$PVHOME/lib/python2.7/site-packages/vtk/ >> export >> >> PYTHONPATH=$PYTHONPATH:$PVHOME/lib/python2.7/site-packages/paraview/ >> >> $PVHOME/bin/paraview >> >> -------------------------------------------------------------------------------------------------------------------- >> >> On each machine I start paraview and load a state that has a >> programmable filter with the line: >> >> d0 = inputs[0].PointSet['d'] >> >> One one machine, this works just fine. On the other >> machine, I get the >> following message in the Output: >> >> >> -------------------------------------------------------------------------------------------------------------------- >> >> Traceback (most recent call last): File "", line 24, in >> File "", line 2, >> in RequestData TypeError: 'NoneType' object has no >> attribute '__getitem__' >> >> BTW, this is just a test; obviously, my real filter does >> something. >> >> I assume that some module is not being loaded here, but >> I've tried >> _everything_ I could think of and I'm not making >> progress. Any ideas?? >> >> -- >> Martin Weinberg >> 6 Grass Hill Rd >> >> <https://maps.google.com/?q=6+Grass+Hill+Rd+%0D%0AWest+Whately,+MA&entry=gmail&source=g> >> West Whately, MA >> 010039 >> >> >> >> _______________________________________________ >> Powered by www.kitware.com <http://www.kitware.com> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> <http://www.kitware.com/opensource/opensource.html> >> >> Please keep messages on-topic and check the ParaView Wiki >> at: http://paraview.org/Wiki/ParaView >> <http://paraview.org/Wiki/ParaView> >> >> Search the list archives at: >> http://markmail.org/search/?q=ParaView >> <http://markmail.org/search/?q=ParaView> >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/paraview >> <https://public.kitware.com/mailman/listinfo/paraview> >> >> >> >> -- >> Martin Weinberg >> 6 Grass Hill Rd >> >> <https://maps.google.com/?q=6+Grass+Hill+Rd+%0D%0AWest+Whately,+MA&entry=gmail&source=g> >> West Whately, MA >> >> -- Martin Weinberg 6 Grass Hill Rd West Whately, MA 010039
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview
