CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Python and paraview.simple libprotobuf error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2016, 20:28
Default Python and paraview.simple libprotobuf error
  #1
New Member
 
Join Date: Oct 2016
Posts: 2
Rep Power: 0
Private Mandella is on a distinguished road
I want to automate my use of paraview using python. I'm using Python 2.7, Paraview 3.14.1 on Ubuntu 12.04 LTS. However, I am having problems loading the required modules to write the python script. I was initially able to load paraview.simple a few times, then I received the errors described below. I tried restarting Ubuntu. A shot in the dark, I know, but I don't know what else to do. I just tried to load some of the other modules: paraview.pvfilters, paraview.vtk, and paraview.util loaded; while paraview.servermanager gave the same error as paraview.simple.

When I run
Code:
import paraview.simple
I get
Code:
libprotobuf ERROR /build/buildd/paraview3.14.1/Utilities/protobuf/src/google/protobuf/descriptor_database.cc:57]
File already exists in database: vtkPVMessage.proto
libprotobuf FATAL /build/buildd/paraview3.14.1/Utilities/protobuf/src/google/protobuf/descriptor.cc:860]
CHECK failed: generated_database_>Add(encoded_file_descriptor, size):
Aborted (core dumped)
If I run
Code:
import paraview
help(paraview)
I get
Code:
NAME
    paraview

FILE
    /usr/lib/python2.7/dist-packages/paraview/__init__.py

MODULE DOCS
    http://docs.python.org/library/paraview

DESCRIPTION
    This module is not meant to be used directly. Please look at one of the modules
    it provides:
        servermanager
        pvfilters
        vtk
        numeric
        util
        simple
    :
And then
Code:
    help(paraview.simple)
    AttributeError: 'module' has no attribute 'simple'
The file "simple.py" and "simple.pyc" are in the paraview folder indicated by help(paraview).
I should probably note the recommended way to load the module
Code:
    try: paraview.simple
    except: from paraview.simple import *
returns the same libprotobuf error as described above. Since I can access the paraview module, it seems as though there is an issue with a library that simple is calling? Maybe? I have no idea what any of this means. Thanks for any help.

Edit
I'm going to try to see if following the rabbit hole from this https://github.com/BVLC/caffe/issues/1917 will fix the issue.

Last edited by Private Mandella; October 26, 2016 at 11:41.
Private Mandella is offline   Reply With Quote

Old   October 26, 2016, 14:25
Default Version control
  #2
New Member
 
Join Date: Oct 2016
Posts: 2
Rep Power: 0
Private Mandella is on a distinguished road
The error must be with the version that the module loads from. When I run the scripts as using pvpython instead of python, the module loads correctly and indicates that the version is 4.1.
Private Mandella is offline   Reply With Quote

Reply

Tags
openfoam, paraview 3.14, paraview.simple, python


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview from python shell : Glew initialization and VTKcommoncorepython error pradyumnsingh ParaView 0 September 18, 2018 14:40
[General] Generating isosurface from vtk file with python script Leios ParaView 1 March 26, 2018 13:33
[General] Paraview.simple python module and loading legacy vtk file timeseries awa5114 ParaView 2 July 17, 2017 09:40
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 aylalisa ParaView 4 June 13, 2014 09:52
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23


All times are GMT -4. The time now is 17:03.