Problem with 'module' object is not callable

I have a module I created to read in a data file (not cvs), do some calculations on the data, creating a few attributes.
This works perfectly fine, have been using it for months.

Now I want to hang this in a Dash app, with the goal to be able to plot some of the data and attributes.

In the script as I have it now it goes:

import Dash stuff
import Plotly stuff

import numpy as np

from DeflectionTableTools import DeflectionTableTools as dtt (this is my module)

a = dtt (‘somefilename’)

this reads in the data file and does some calculations on it, creating a few attributes, such

as a.table, a.slopetable, etc.

print (a.table) (works perfectly OK)

app.layout …

@app.callback

However, the moment the script hits the

app.run_server

command, it stops and tells me that:

a = dtt (‘somefilename’)
TypeError: ‘module’ object is not callable

I figured it is related to the call of the app.run_server somehow, but I have not been able to understand in what way and googling did not lead to any possible solutions.

Does anyone have an idea how I can solve this issue so that I can use my module?

Thanks for your time and attention!

Maarten