Update troubleshooting authored by Jakob Grahn's avatar Jakob Grahn
......@@ -16,9 +16,37 @@ If the error is on the form "ModuleNotFoundError: ...", like this:
the reason is likely that the python environment is not setup correctly. Try the following:
### 1: Assert that the vpi-environment is selected
In ArcGIS, go to `Project` > `Python` > `Manage Environments`:
![image](/uploads/1bd842fe8aea9e9e4408254e31c65f6d/image.png)
Check that the environment called "vpi" is marked as "Active". If there is no environment called "vpi", go through [step 2 in the installation instructions](https://gitlab.itek.norut.no/jakob/vpi-toolbox/wikis/how-to-setup#2-create-arcgis-conda-environment). If the environment is not marked as active (as in the above figure), press the bullet to activate it:
![image](/uploads/dc1feec251c9f5085979b920bb1c6a59/image.png)
Press OK and restart ArcGIS. If this does not solve the syntax error, try the step described below.
### 2: Re-build the vpi-environment
Go through step 1 above if you haven't done so. Exit ArcGIS if open. In the windows start menu, go: `Start` > `ArcGIS` > `Python Command Prompt`:
[[resources/how-to-setup_python-command-prompt.png]]
In the command prompt, type (where `C:\path-to-vpi-codes\` must be changed to the path to the vpi source code):
```bash
cd C:\path-to-vpi-codes\
conda remove --name vpi --all
conda create --clone arcgispro-py3 --name vpi
conda env update --name vpi --file conda\environment_arcgis.yml
```
Open ArcGIS Pro, go to `Project` > `Python` > `Manage Environments`:
![image](/uploads/dc1feec251c9f5085979b920bb1c6a59/image.png)
Activate the environment called "vpi":
[[resources/how-to-setup_manage_environments.png]]
Restart ArcGIS and check if the syntax error persists. If so, contact the project owner.