Can’t find your question or solution here? Please reach out to our Community Forum, so our community can help you!
Did you experience issues while trying to use VIKTOR? Let’s try to find a solution by checking some FAQs!
We categorized the questions into the following topics:
What is my token and where can I find it?
Your token is your unique key needed to configure the CLI.
- Log in to your VIKTOR environment (
- Go to the settings page by clicking the three dots next to your name in the top-right corner and after that clicking 'Settings'. Select the 'Developer Account' tab.
- Click on Generate new token.
How to generate a new token
Installing the CLI
Windows defender does not allow me to install the VIKTOR CLI
Sometimes, Windows defender prevents the CLI installer from running. To solve this:
- Click “More info”.
- Click on “Run anyway”.
How can I use VIKTOR within an enterprise IT environment?
It is possible that your company has set restrictions on either your machine or the company's network that cause problems when working with VIKTOR. If you want to use VIKTOR within an enterprise IT environment, please make sure that your machine meets all requirements. See the enterprise IT guide for more information.
Configuring the CLI
I get the error: Python not added to “PATH”
You get this error because you forgot to check “Add Python to PATH” during the installation of Python. Please check the Python installation requirements to solve this issue.
I get the error: the provided email address and token are not registered at VIKTOR. Please rerun the “configure” command with valid credentials.
This problem could have multiple causes. Let’s go through them:
- Do you have a VIKTOR account? If not, you can create one for free here.
- Make sure you provide the email you used to create your account.
- Make sure you are using a valid token.
- If the steps above do not fix this problem for you, reach out to our community forum so that we can help you find a solution.
Using the CLI
My command-line interface seems to be frozen
In case you accidentally clicked somewhere in the command prompt window, it could cause the process to freeze. You can resume the process by hitting enter. The frozen state can also completely be avoided by disabling "QuickEdit Mode":
- Open a command prompt
- Right-click the title bar and select "Properties"
- Uncheck "QuickEdit Mode"
- Restart the command prompt
I am experiencing network / WiFi problems after changes in Hyper-V settings
If one experiences network or WiFi problems after turning on Hyper-V, then possible solutions are described on the Docker website. This is a known issue that sometimes occurs during the Docker installation.
I got the error: "Deny write access to fixed drives not protected by Bitlocker"
Please see https://github.com/docker/for-win/issues/1297 for more information.
I’m not able to install my app and get the error: Exiting because of an error: no requirements.txt file
When you run
viktor-cli install, you ask VIKTOR to install the app stored inside the folder where you run the
command. The error occurs when there is no
requirements.txt file in the folder, or there is no app stored in that
folder at all. To solve the latter:
- Inside your command-line shell, first navigate to the folder with the app files.
- Then, run
I got the error: Manifest is invalid: Manifest misses entity type XXXX, which is present in the database
This error commonly occurs when you start a new app while the database still has information about a previously run app. The solution is easy. Clear the database by running the following command in your command-line shell:
I got the error: ModuleNotFoundError: No module named "XXXX”
This error commonly occurs when you try to use an external library in your app, but you did not install the library. You can solve this problem by:
- Open the
requirements.txtfile found in your app folder.
- Add the library name you want to use and save the file.
- Install your app again by running
viktor-cli installin the command-line shell.
- Start your app with
For example, if you want to use NumPy in your app, the
requirements.txt file should look something like this:
When I open my app, I get the error: failed to load the editor
This error occurs when your app loses connection with the CLI, for example, because:
- You closed the command-line shell used to
viktor-cli startyour app.
- You were inactive for an extended period, and the CLI disconnected automatically.
The solution is simple. In your command-line shell, start your app again by running the following command:
Do you experience any issues which were not on this list? Or do you have any questions which have not been answered yet? Please let us know by sending an email to email@example.com.
Why is my published application not behaving the same as during development?
When you choose to develop using a Python virtual environment (venv), there will be several differences with respect to published apps on the platform. It is good to be aware of these differences to prevent unexpected errors after publishing an app. An overview of the differences is given in the list below:
The apps you publish on the VIKTOR platform run on Linux. If you are using a virtual environment on Windows you will be running the app and its dependencies on Windows. Keep in mind that some external dependencies might not be available on Linux. During development the app will appear to be working without any problems, but using such dependencies will cause your app to break in production. You can find the information on which operating systems you can use for a certain package on the Python Package Index.
Some dependencies do not provide wheels for Windows on PyPi. A wheel is a built distribution of a package that is ready to install with
pip. If there are no wheels available the package needs to be build from source. The prerequisite is that you have all build dependencies installed on your system. If wheels are available for Linux you can consider switching to
dockeras isolation mode and run the app in a Linux container. Another option is to host the wheels yourself or use unofficial Windows wheels provided by a third party such as Christoph Gohlke from the University of California. Because wheels are OS and Python version dependent you will need to add environment markers to
requirements.txtfor condition-based installation of dependencies. A package that does not have Windows wheels available on PyPI is 'Fiona', which is a dependency of 'GeoPandas'. An example on how to use the wheels provided by Christoph Gohlke in
requirements.txtis shown below:
https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/GDAL-3.3.3-cp37-cp37m-win_amd64.whl; platform_system == "Windows"
https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/Fiona-1.8.20-cp37-cp37m-win_amd64.whl; platform_system == "Windows"
fiona==1.8.20; platform_system != "Windows"
When using a Python virtual environment as isolation mode it is possible to access the entire filesystem from the app code during development. If you publish an application on the platform only the folder containing the app is uploaded. If you access any resources outside this folder your app will not work.
It is not possible to limit the memory usage of the Python process when using a virtual environment. Please keep in mind that standard apps on the platform have 500 MB of RAM available. Memory heavy operations that work in your virtual environment might not work in production.
The application can be published on a specific Python version by setting the
python_versionin the viktor.config.toml file, which could differ from the Python version you are using for development. If you are developing with a newer version, please make sure that you are not using features that are not supported by the Python version used for publishing.