ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

ament_flake8 fails with AttributeError

asked 2020-05-28 03:24:16 -0600

alsora gravatar image

Hi, I'm trying to run ament_flake8 in my workspace.

This is what I do

mkdir -p ws/src 
git clone MY_REPO ws/src/repo
cd ws
colcon build
ament_flake8 .

And I get the error

Traceback (most recent call last):
File "/opt/ros/eloquent/bin/ament_flake8", line 11, in <module> load_entry_point('ament-flake8==0.8.1', 'console_scripts', 'ament_flake8')()
File "/opt/ros/eloquent/lib/python3.6/site-packages/ament_flake8/main.py", line 75, in main max_line_length=args.linelength) File "/opt/ros/eloquent/lib/python3.6/site-packages/ament_flake8/main.py", line 163, in generate_flake8_report style = get_flake8_style_guide(flake8_argv)
File "/opt/ros/eloquent/lib/python3.6/site-packages/ament_flake8/main.py", line 131, in get_flake8_style_guide application.parse_preliminary_options_and_args([]) AttributeError: 'Application' object has no attribute 'parse_preliminary_options_and_args'

Note that if instead I run flake8 . this works as expected.

I'm using a Dockerfile FROM osrf/ros:eloquent-desktop

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-28 14:03:34 -0600

Dirk Thomas gravatar image

A recent release of flake8 (3.8) broke API the ament_flake8 package uses. You can:

edit flag offensive delete link more

Comments

1

Thank you, this command did the job

pip install -Iv flake8==3.7
alsora gravatar image alsora  ( 2020-05-29 02:19:35 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-05-28 03:24:16 -0600

Seen: 693 times

Last updated: May 28 '20