Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake8>=3.8.0: 'Namespace' object has no attribute 'output_file' #1112

Closed
asottile opened this issue Apr 3, 2021 · 14 comments
Closed

Flake8>=3.8.0: 'Namespace' object has no attribute 'output_file' #1112

asottile opened this issue Apr 3, 2021 · 14 comments

Comments

@asottile
Copy link
Member

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 02:47

This error come from flake8-rst:

# flake8-rst
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.6/x64/bin/flake8-rst", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8_rst/cli.py", line 16, in main
    app.run(argv)
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/main/application.py", line 360, in run
    self._run(argv)
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/main/application.py", line 347, in _run
    self.initialize(argv)
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/main/application.py", line 333, in initialize
    self.make_formatter()
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/main/application.py", line 226, in make_formatter
    self.formatter = formatter_class(self.options)
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/plugins/manager.py", line 131, in execute
    return self.plugin(*args, **kwargs)  # pylint: disable=not-callable
  File "/opt/hostedtoolcache/Python/3.7.6/x64/lib/python3.7/site-packages/flake8/formatting/base.py", line 48, in __init__
    self.filename = options.output_file
AttributeError: 'Namespace' object has no attribute 'output_file'

See full build logs.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on May 12, 2020, 04:16

Does this happen with just flake8?

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 04:42

@sigmavirus24, I don't know. Maybe flake8-rst wrongly uses your plugin API, but right now it seems to me as a flake8 issue.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on May 12, 2020, 05:08

We don't have a public API the way that project uses flake8 so to me it
seems like flake8-rst is using things incorrectly and you're suffering for
it

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 05:30

So, you think I should reopen this issue against flake8-rst repo?

Any glue on how flake8-rst is using things incorrectly?

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @ericvw on May 12, 2020, 06:25

@skirpichev There was a regression in flake8==3.8.0 with respect to --output-file (see #637). Can you please confirm if you still observe this issue with flake8 >= 3.8.1. Thanks.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 07:03

Yes. The referenced above build logs are for flake8==3.8.1.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @ericvw on May 12, 2020, 07:19

Thank you for confirming. The referenced build logs URI expired, so I was unable to see what version was being used.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @ericvw on May 12, 2020, 07:27

flake8-rst is using a private API here and is using flake8 incorrectly.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @asottile on May 12, 2020, 07:29

indeed, was about to comment the same -- thanks for the investigation @ericvw

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @asottile on May 12, 2020, 07:29

closed

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 07:40

changed the description

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 07:41

Sorry, corrected.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @skirpichev on May 12, 2020, 07:43

Ok, thank you for "explanation".

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @ericvw on Oct 21, 2020, 10:16

mentioned in merge request !458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant