Isolation mode: venv
Consider the following code (parametrization and controller for a project entity):
class ProjectParametrization(Parametrization): """parametrization of project""" project_information = Page("Project information") project_information.project_number = TextField("Project number") project_information.project_name = TextField("Project name") class ProjectController(ViktorController): """controller for project entity""" viktor_enforce_field_constraints = True parametrization = ProjectParametrization() label = "Project" summary = Summary( project_number=SummaryItem("Project number", str, "parametrization", "project_information.project_number"), project_name=SummaryItem("Project name", str, "parametrization", "project_information.project_name"), ) children = ["Analysis"] show_children_as = "Table"
This code works fine until new lines of code are added. When reload gets triggered, it throws the following error.
If I “keyboard-interrupt” this, type in “viktor-cli clear” and then start again by “viktor-cli start”, the error message will dissappear and the app works fine until changes are made and I get the same error again.
I have tried changing the keys in Summary(), but that has the same effect. It works until changes are made and then it throws this error again.
I have this problem in development environment. I have not tried this in production, but I have heard from colleagues that they don’t have this problem in production.
I could use the abovementioned temporary fixes, but I eventually expect not to see the error message again.