First iteration

This commit is contained in:
sergi-e 2020-09-09 13:50:56 +02:00 committed by bernat
parent 131764de0c
commit 03bcce6329
2 changed files with 53 additions and 0 deletions

View File

@ -104,6 +104,59 @@ make PythonAPI.docs
</details>
<!-- ======================================================================= -->
<details>
<summary><h5 style="display:inline">
Cannot run example scripts or "RuntimeError: rpc::rpc_error during call in function version"
</h5></summary>
![faq_rpc_error](img/faq_rpc_error.jpg)
If running a script returns an output similar to this, there is a problem with the `.egg` file in the PythonAPI.
First of all, open `<root_carla>/PythonAPI/carla/dist`. There should be an `.egg` file for the corresponding CARLA and Python version you are using (similar to `carla-0.X.X-pyX.X-linux-x86_64.egg`). Make sure the file matches the Python version you are using. To check your Python version use the following command.
```sh
python3 --version # CARLA no longer provides support for Python2, so we are dismissing it here
```
If either the file is missing or you think it could be corrupted, try rebuilding again.
```sh
make clean
make PythonAPI
make launch
```
Now try one of the example scripts again.
```sh
cd PythonAPI/examples
python3 dynamic_weather.py
```
If the error persists, the problem is probably related with your PythonPATH. These scripts automatically look for the `.egg` file associated with the build, so maybe there is any other `.egg` file in your PythonPATH interfering with the process. Show the content of the PythonPATH with the following command.
```sh
python -c "import sys; print('\n'.join(sys.path))"
```
Look up in the output for other instances of `.egg` files in a route similar to `PythonAPI/carla/dist`, and get rid of these. They probably belong to other instances of CARLA installations.
Ultimately there is the option to add the `.egg` file of your build to the PythonPATH using the `~/.bashrc`. This is not the recommended way, as the path will need an update for every new release.
First, open the `~/.bashrc`.
```sh
gedit ~/.bashrc
```
Edit the following line to match your CARLA and Python version. In other words, change `carla-0.9.10-py3.6-linux-x86_64.egg` for the name of your `.egg` file.
```
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.10-py3.6-linux-x86_64.egg:${CARLA_ROOT}/PythonAPI/carla/agents:${CARLA_ROOT}/PythonAPI/carla
```
Add the line to the `~/.bashrc`, save the file, and reset the terminal for changes to be effective.
After cleaning the PythonPATH or adding the path to the new `.egg` file, all the example scripts should work properly.
</details>
---
## Windows build

BIN
Docs/img/faq_rpc_error.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 KiB