# Error while adding missing .ddl files to pvpython

**URL:** https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370
**Category:** Web
**Created:** [August 13, 2021, 3:21pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370 "2021-08-13T15:21:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![BadCookie](https://discourse.vtk.org/user_avatar/discourse.vtk.org/badcookie/32/3603_2.png) [@BadCookie](https://discourse.vtk.org/u/BadCookie)
#### Post date: [August 13, 2021, 3:21pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/1 "2021-08-13T15:21:52Z")

</div>

Hi all,

As an example, I’m using vtk as a server, paraview web as a client and running them with pvpython of Paraview 5.9.0.I want to be able to use vtkImageViewer2. For some reason, vtkInteractionImage is not included in the bin/Lib/site-package/vtkmodules of Paraview 5.9.0 Therefore the vtkmodules/all.py is not recognizing vtkmodules.vtkInteractionImage.vtkImageViewer2.

 ![dllfilepresent](https://discourse.vtk.org/uploads/default/original/2X/3/3f0bc233d9bcfab66b623c5f6fe56750cf4befe1.png)

Whereas, vtkImageViewer2 is present in a normal vtk 9.0.3 version installed in an anaconda environment.

 ![conda_dll_file_present](https://discourse.vtk.org/uploads/default/original/2X/e/ee9fd4c3442f5b96808f57e5bf9651f2c0fe20e1.png)

I want to be able to use vtkImageViewer2 with the vtkmodules inside bin/Lib/site-package of Paraview 5.9.0. How would I include the vtkInteractionImage .dll files.

What I’ve tried so far…  
Copy pasting the .dll file and .pyd file of vtkInteractionImage from the vtkmodules in the anaconda environment to the bin/Lib/site-package/vtkmodules of Paraview 5.9.0 and adding this line, “from .vtkInteractionImage import \*” in the all.py module of bin/Lib/site-package/vtkmodules of Paraview 5.9.0. But, still I’m getting an error like,  
“ImportError: DLL load failed while importing vtkInteractionImage: The specified module could not be found.”

Below are the images for your reference.

Copied the .dll and .pyd file.

 ![copied_dll_and_pyd_files](https://discourse.vtk.org/uploads/default/original/2X/b/be7db389b44b710fb4f4bd343c600b6042b10f54.png)

Adding the .vtkinteractionImage import to all.py

![adding_an_import](https://discourse.vtk.org/uploads/default/original/2X/3/32823ddacc33af6460680c422715c4f3500473df.png)

The error message:

 ![dll_not_found_error](https://discourse.vtk.org/uploads/default/original/2X/0/0b4345078af2fbcd27dad4c0160f9acb518ce215.png)

What am I missing? Any help on this is highly appreciated. Thanks in advance!

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 13, 2021, 4:36pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/2 "2021-08-13T16:36:56Z")

</div>

It might be easier to use any [pre-release version of vtk](https://pypi.org/project/vtk/#history) instead of ParaView for running your server.

---

<div class="post-metadata">

### Author: ![BadCookie](https://discourse.vtk.org/user_avatar/discourse.vtk.org/badcookie/32/3603_2.png) [@BadCookie](https://discourse.vtk.org/u/BadCookie)
#### Post date: [August 13, 2021, 5:16pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/3 "2021-08-13T17:16:37Z")

</div>

Hi Sebastien,

I tried doing that. I’m so confused. But, I’m facing a lot of issues. For eg: I used flask as a web server instead of pvpython. And pip install vtk instead of the vtk in paraview. The problem is flask’s app.run() and wslink.server’s start\_server() are both blocking calls. I guess I have to do some multi-threading. But, I’m not sure. How is pvpython handling it? Also I’m confused. If I use flask, for the requests, say you visit a url, like [http://localhost:5000](http://localhost:5000) after that you create a websocket connection, then I guess I’ll have to use flask socket io instead of ws link right? If I replace wslink, then I won’t be able to use the exportRPC for easy callbacks. That’s why I thought adding the required .dll files would be the best way.

Any direction on any of these 2 approaches is appreciated.  
Thank you.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 13, 2021, 7:05pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/4 "2021-08-13T19:05:41Z")

</div>

What do you serve with Flask? Do you need to share memory with the VTK (wslink) that get used by the client?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 13, 2021, 8:08pm UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/5 "2021-08-13T20:08:17Z")

</div>

If you can, keep the 2 process separate. Ideally you want to use a launcher to start 1 wslink process per client. And you can use your flask for serving the static content to the client along with other dynamic resources.

---

<div class="post-metadata">

### Author: ![BadCookie](https://discourse.vtk.org/user_avatar/discourse.vtk.org/badcookie/32/3603_2.png) [@BadCookie](https://discourse.vtk.org/u/BadCookie)
#### Post date: [August 14, 2021, 4:18am UTC](https://discourse.vtk.org/t/error-while-adding-missing-ddl-files-to-pvpython/6370/6 "2021-08-14T04:18:33Z")

</div>

To answer your questions…  
What do you server with Flask? - just static files like html and js  
Do you need to share memory with wslink that is being used by client? - yes  
Basically, just like this example here, [paraviewweb-examples/multiviews at master · Kitware/paraviewweb-examples · GitHub](https://github.com/Kitware/paraviewweb-examples/tree/master/multiviews)  
Have the exact same tech stack and only replace pvpython with flask as server.

Okay, i’ll try the way you suggested. What you’re suggesting is something like this? [ParaView Lite](https://kitware.github.io/paraview-lite/docs/python_launcher.html) and modify to fit my requirement?
