I am trying to set up tabs and /or sections, I add to the parametrization class, not sure if I have to do any change in the controller class. The fact is that I am getting the error
App definition is invalid: Entity type Controller is wrongly defined: Invalid parametrization
To be noted that I am trying to append the input in the controller class to write it in a word file
The error you are seeing is telling you that the definition in your parametrization is wrong, and VIKTOR can’t draw it on the screen. It seems likely to me that something is going wrong with your code in trying to create tabs and sections.
In short, tabs and sections are optional hierarchical layering in you parametrization. You can use them if you import them from the SDK: from viktor.parametrization import Tab, Section
And then use them to organize your fields, e.g.:
class Parametrization(ViktorParametrization):
tab_1 = Tab('Tab 1')
tab_1.section_1 = Section('Section 1')
tab_1.section_1.input_1 = TextField('This is a text field')
tab_1.section_1.input_2 = NumberField('This is a number field')
tab_1.section_2 = Section('Section 2')
...
tab_2 = Tab('Tab 2')
...
As far as I can tell from the excerpt you posted nothing should go wrong in the Parametrization. However, the fact that you are calling on a param in your Controller which is not seen in the Parametrization leads me to believe that your Parametrization is larger than is shown in the excerpt.
Thus, the issue has to lie somewhere else in your Parametrization. Could you explain/show a little more about its structure? For example, it is also not possible to start a Page/Tab with some “bare” params and afterwards start Sections. So the following is a common mistake: