Modify an existing app coded with an old viktor version

After following the tutorials, I am modifying the ā€˜CPT-interpreterā€™ app that was written with an old version of Viktor/python (3.7).

When I attempt using viktorā€™s parametrization.pyi classes and functions (such as @DataView, Image, ect.) these are not readly available and I get the following error message: ā€œERROR : cannot import name ā€˜Imageā€™ from ā€˜viktor.parametrizationā€™ (C:\Users***\viktor-apps\sample-cpt-interpreter-main\venv\Lib\site-packages\viktor\parametrization.cp311-win_amd64.pyd)ā€.

I attempted running the following instructions but I guess did not succeed ( SDK - Deprecations & Upgrades | VIKTOR Documentation) .

Can you please help me understand/identify what part am I missing? or provide some steps to follow in order to upgrade/update the app or being able to use the new viktorā€™s features?

hi @stannecerto,
Welcome to the community!

When you get import errors it probably means that the version of viktor that you have installed does not contain these objects. You can see in the changelog what was introduced in what version.

Make sure to update the version of viktor inside your requirements.txt file and after that perform viktor-cli install to install this updated version.

The latest version is 14.7.0:

hope this helps
cheers,
Matthijs

PS: make sure that you also upgrade python to at least 3.8, since VIKTOR versions 14 only support this python and higher (the current latest python version is 3.12)