'qSlicerScriptedLoadableModule' object is not subscriptable

Hi all,

The following error was printed in the python interactor upon start-up after I added a custom module path to Slicer.

Traceback (most recent call last):
  File "~/CreateMesh/CreateMesh.py", line 43, in __init__
    self.smoothN = meshparams["smoothNumberOfIterations"]
TypeError: 'qSlicerScriptedLoadableModule' object is not subscriptable
TypeError: module() argument 'name' must be str, not qSlicerScriptedLoadableModule

Does anyone know what is the reason for this error? Below is a snippet of the custom module. Many thanks!

import numpy as np
import copy
import logging
import vtk, qt, slicer
from slicer.ScriptedLoadableModule import *
from ExtractCenterline import ExtractCenterlineLogic


class CreateMesh:

    def __init__(self, meshparams={}):
          self.modelNodes = None
          self.imageNodes = None
          self.centerlines = None
          self.surface = None
          self.surfacePolyData = None
          self.mesh = None
          self.prevCenterlines = None
          self.prevSurface = None
          self.prevMesh = None
          self.meshErrorsMarkupsNode = None
          self.endPointsMarkupsNode = None
          self.inputSurfaceForCenterline = None
          self.networkPolyData = None
          self.networkModelNode = None
          self.networkCurveNode = None
          self.networkPropertiesTableNode = None
          self.centerlineModelNode = None
          self.centerlineCurveNode = None
          self.centerlinePropertiesTableNode = None
          self.voronoiDiagramModelNode = None
          self.clMaker = ExtractCenterlineLogic()
          self.meshMaker = CreateMeshLogic()

          self.smoothN = meshparams["smoothNumberOfIterations"]