I am trying to call a python function using Tableau using the Tabpy interface but I am receiving a "No module named interface_v1" error. The steps I have taken:
- Install tabpy using the git instructions here
- Defined my function inside a file called interface_v1.py. The function is below
def call_matlab(a):
return a
- Started the tabpy server
- Opened a new Tableau workbook and connected to the server
- Created a new calculated field with:
SCRIPT_INT("import interface_v1 as inter
return inter.call_matlab(_arg1)", SUM([Body]))
When I try to use the calculated field I receive the above error ModuleNotFoundError in the tabpy server log. I have the workbook and the python file in the same directory, and I also tried to put it in the tabpy\modules\scripts folder.
Note: I am not using tabpy in a virtual environment and I am very new to Tableau so sorry if I am just missing something. Thanks for any help.