Hi,
I've been writing some python scripts and running them through the paraview GUI. I start the scripts with

   from paraview import servermanager

When I use pvpython or pvbatch to run the same scripts I receive an error:

[project] pvpython paraview.py
Traceback (most recent call last):
 File "paraview.py", line 1, in <module>
   from paraview import servermanager
 File "/home/project/paraview.py", line 1, in <module>
   from paraview import servermanager
ImportError: cannot import name servermanager


After messing with this for a while I finally tried:

   import servermanager

which worked.

Question: Why is there a difference in the way the servermanager is imported between paraview gui and pvpython/pvbatch? Have other people run across this issue? This is version 3.2.2. Is it possible there is something wrong my build? If this is something I just have to live with, is there a way to prevent the error from closing the script/interpreter, check to see if the first import failed and then run the second import?

Thanks,
Pat

--
Patrick Shinpaugh
Virginia Tech
UVAG System Administrator/Programmer
540-231-2054

_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to