Skip to content

Commit

Permalink
Updated troubleshooting md (#2843)
Browse files Browse the repository at this point in the history
* Updated troubleshooting md

Improved 'fprime-util: command not found' section. Related to #2837

* Corrected typo
  • Loading branch information
mprather committed Aug 21, 2024
1 parent 7bb161f commit fd11742
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/UsersGuide/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This section is divided into four sub-sections:
- [Data Types and Data Structures: Primitive Types, Enums, Arrays, and Serializables](user/enum-arr-ser.md)
- [Data Constructs: Commands, Events, Channels, and Parameters](user/cmd-evt-chn-prm.md)
- [Unit Testing F´ Components](./user/unit-testing.md)
- [Troubleshooting FAQ](../troubleshooting.md)
- F´ Best Practices: helpful patterns when developing F´ software
- [F´ Development Process](./best/development-practice.md)
- [Application, Manager, Driver Pattern](./best/app-man-drv.md)
Expand Down
25 changes: 20 additions & 5 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,26 @@ Some of the F´ Python packages are built in a way that it is recommended to ins

## fprime-util: command not found

If the user is using a virtual environment and receives the ‘command not found’, the problem is likely caused by the environment not being sourced in a new terminal. Make sure to source the environment before running:
```
. <path/to/project>/fprime-venv/bin/activate
```
If installing without a virtual environment, PIP occasionally uses `$HOME/.local/bin` as a place to install user tools. Users running without virtual environments should add this directory to the path.
There are at least three common reasons for this error.

1. If the user is using a virtual environment and receives the ‘command not found’, the problem is likely caused by the environment not being sourced in a new terminal. Make sure to source the environment before running:
```sh
# In MyProject
. fprime-venv/bin/activate
```

1. If the project folder was moved after the virtual environment was provisioned (e.g. project was originally setup in `/folderA/MyProject` and moved to `/someOtherFolder/MyProject`), various files in the original `fprime-venv` folder will contain references to the original path. The easiest resolution is to remove and reprovision the virtual environment with the following:
```sh
# In MyProject
rm -rf fprime-venv
python -m venv fprime-venv
. fprime-venv/bin/activate
pip install -r fprime/requirements.txt
```

> Some projects ship their own `requirements.txt`. Install using that file if it exists.

1. If installing without a virtual environment, PIP occasionally uses `$HOME/.local/bin` as a place to install user tools. Users running without virtual environments should add this directory to the path.

## Helper script ‘fpp-redirect-helper’ exited with reason: Permission denied
This error can occur when the helper-script, (`fprime/cmake/autocoder/fpp-wrapper/fpp-redirect-helper`) loses its execution permission.
Expand Down

0 comments on commit fd11742

Please sign in to comment.