Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global name ‘vtk’ is not defined #3

Open
haibianshifeng opened this issue Nov 12, 2017 · 0 comments
Open

global name ‘vtk’ is not defined #3

haibianshifeng opened this issue Nov 12, 2017 · 0 comments

Comments

@haibianshifeng
Copy link

I installed the pypnm on my system ubuntu 14.04.

When I run the example of quasistatic flow. The error appears.

lei@lei-ThinkPad-Edge:~/pypnm/examples/quasistatic_flow_solver$ python quasistatic_drainage_imbibition.py 
porenetwork.py:69 - 2017-11-12 08:36:48,226 - pypnm.porenetwork - WARNING - Had to decrease radius of 872 tubes so that they are smaller than neighboring pores
Number of pores with volume set to zero: 26352
Number of tubes with volume set to zero: 77436
Traceback (most recent call last):
  File "quasistatic_drainage_imbibition.py", line 54, in <module>
    run_quasi_static(network)
  File "quasistatic_drainage_imbibition.py", line 12, in run_quasi_static
    simulation.create_vtk_output_folder("paraview_quasistatic_run", delete_existing_files=True)
  File "/home/lei/anaconda2/lib/python2.7/site-packages/pypnm-0.1-py2.7.egg/pypnm/flow_simulation/simulation.py", line 39, in create_vtk_output_folder
    self.vtk_writer = VtkWriter(self.network, folder_name, delete_existing_files)
  File "/home/lei/anaconda2/lib/python2.7/site-packages/pypnm-0.1-py2.7.egg/pypnm/postprocessing/vtk_output.py", line 30, in __init__
    self.polydata = self.polydata_from_network(self.network)
  File "/home/lei/anaconda2/lib/python2.7/site-packages/pypnm-0.1-py2.7.egg/pypnm/postprocessing/vtk_output.py", line 94, in polydata_from_network
    polydata = vtk.vtkPolyData()
NameError: global name 'vtk' is not defined

How to solve it?
Many Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant