# Trame with custom vtkmodules library

**URL:** <https://discourse.vtk.org/t/trame-with-custom-vtkmodules-library/9463>\
**Category:** Development\
**Created:** [September 26, 2022, 5:55pm UTC](https://discourse.vtk.org/t/trame-with-custom-vtkmodules-library/9463 "2022-09-26T17:55:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kostas\_Politis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kostas_politis/32/4328_2.png) [@Kostas\_Politis](https://discourse.vtk.org/u/Kostas_Politis)\
**Post date:** [September 26, 2022, 5:55pm UTC](https://discourse.vtk.org/t/trame-with-custom-vtkmodules-library/9463/1 "2022-09-26T17:55:08Z")

</div>

Hello all,

I’m trying to use trame with a custom vtk python build (which adds a module that exposes an interface to an external library). Everything seems to work fine regarding the custom python extensions. However, when calling 04\_application/solution.py I get the following error:

> VTK is not available inside your Python environment  
> Traceback (most recent call last):  
> File “C:\Users\Tester\trame-tutorial\04\_application\solution3.py”, line 609, in   
> view = vtk.VtkRemoteLocalView(  
> File “C:\Python310\lib\site-packages\trame\_vtk\widgets\vtk\common.py”, line 380, in **init**  
> self.server.state[self.\__view\_key\_id] = MODULE.id(view)  
> File "C:\Python310\lib\site-packages\trame\_vtk\modules\vtk\_init_.py", line 175, in id  
> return HELPER.id(vtk\_obj)  
> AttributeError: ‘NoneType’ object has no attribute ‘id’

Here I didn’t use a venv since I have a minimal env setted up. So I guess, I’m not compiling some of the required modules for Trame.vtk? Is there any minimal module compilations, vtk side, required for trame.vtk (I compile only these vtk mods that I require)? Should I probably compile the wheel and install those instead… I guess nothing would change though… Let me know if you have any suggestions.

Many 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:** [September 26, 2022, 6:26pm UTC](https://discourse.vtk.org/t/trame-with-custom-vtkmodules-library/9463/2 "2022-09-26T18:26:29Z")

</div>

With your VTK you need to enable the Web module. That should allow you to do `import vtk.web`.

---

<div class="post-metadata">

**Author:** ![Kostas\_Politis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kostas_politis/32/4328_2.png) [@Kostas\_Politis](https://discourse.vtk.org/u/Kostas_Politis)\
**Post date:** [October 12, 2022, 9:57am UTC](https://discourse.vtk.org/t/trame-with-custom-vtkmodules-library/9463/3 "2022-10-12T09:57:59Z")

</div>

Thanks ! I’m marking it as solution!
