Carla startup error: AttributeError: 'Client' object has no attribute 'get_trafficmanager'

An error was reported when running carla today, has anyone encountered it?

python automatic_control.py
pygame 2.1.2 (SDL 2.0.16, Python 3.6.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO: listening to server 127.0.0.1:2000
Example of automatic vehicle control from client side.
Traceback (most recent call last):
  File "automatic_control.py", line 846, in <module>
    main()
  File "automatic_control.py", line 839, in main
    game_loop(args)
  File "automatic_control.py", line 696, in game_loop
    traffic_manager = client.get_trafficmanager()
AttributeError: 'Client' object has no attribute 'get_trafficmanager'

Workaround records:

uninstall carla

pip uninstall carla

Reinstall the carla library that matches the carla installation package.

pip3 install carla==0.9.13 -i https://pypi.douban.com/simple --trusted-host pypi.douban.com virtualenvwrapper

Carla is not easy to install, you need to specify the source and trust relationship.

After installation, check the version of carla.

pip list

vtd@vtd:~$ pip list
Package                 Version
----------------------- -------------------
addict                  2.4.0
anyio                   3.6.1
apturl                  0.5.2
argcomplete             1.8.1
argon2-cffi             21.3.0
argon2-cffi-bindings    21.2.0
asn1crypto              0.24.0
async-generator         1.10
attrs                   21.4.0
Babel                   2.10.3
backcall                0.2.0
beautifulsoup4          4.6.0
bleach                  4.1.0
Brlapi                  0.6.6
carla                   0.9.13
certifi                 2018.1.18
cffi 1.15.0
cardet 3.0.4
click 6.7

Finally, run carla again and it will be ok.

python automatic_control.py

Guess you like

Origin blog.csdn.net/weixin_50262060/article/details/125377503