certainly seems like a bug worth fixing. let me know if you want me to start a bug report.

On 07/08/2016 01:19 PM, Burlen Loring wrote:
Thanks Utakarsh. It sounds like it may be possible to work around the issue by not importing the lookuptable module from simple. However, it's "import math" that fails, and math seems like a fairly basic module that should always be present. Is there any chance it got left out of some packaging manifest used in the freeze process? having it be available might be a better solution.

On 07/08/2016 08:38 AM, Utkarsh Ayachit wrote:
I got over such problems by delaying importing of those modules until needed. They are not needed for most common use-cases.

See:
https://gitlab.kitware.com/paraview/paraview/commit/3af48fffd924bf5ffd11f576a261ef4eb3ff5897

On Tue, Jul 5, 2016 at 2:35 PM, Burlen Loring <blor...@lbl.gov <mailto:blor...@lbl.gov>> wrote:

    Hi All,

    I'm encountering some issues when trying to use pvbatch from a
    frozen build(PARAVIEW_FREEZE_PYTHON=ON). Seems that certain key
    python modules are missing.ie <http://missing.ie> math. However,
    I can use Python shell feature in the GUI from the same build. Do
    we have any idea about what may be wrong with pvbatch?


    here is output from a simple test:

        nid00048:~$pvbatch pvbatch-test.py
        started
        Traceback (most recent call last):
          File "pvbatch-test.py", line 3, in <module>
            from paraview.simple import *
          File
        
"/usr/common/graphics/ParaView/builds/PV-4.4.0/lib/site-packages/paraview/simple.py",
        line 40, in <module>
            import lookuptable
          File
        
"/usr/common/graphics/ParaView/builds/PV-4.4.0/lib/site-packages/paraview/lookuptable.py",
        line 21, in <module>
            from math import sqrt
        ImportError: No module named math

    I tried this as well:

        nid00048:~$pvpython
        Python 2.7.9 (default, Jan  8 2015, 22:29:31)
        [GCC 4.9.1 20140716 (Cray Inc.)] on linux2
        Traceback (most recent call last):
          File "/etc/pythonstart", line 7, in <module>
            import readline
        ImportError: Excluded frozen object named readline
        >>> import math
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ImportError: No module named math
        >>>

    Thanks
    Burlen

    _______________________________________________
    Powered by www.kitware.com <http://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:
    http://public.kitware.com/mailman/listinfo/paraview




_______________________________________________
Powered bywww.kitware.com

Visit other Kitware open-source projects 
athttp://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:
http://public.kitware.com/mailman/listinfo/paraview


_______________________________________________
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:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to