Public bug reported:

Context of the file:

#!/usr/bin/python
foobar(value=1, value=2)

flake8 bad_flake8.py 
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 501, in 
run_ast_checks
    ast = self.processor.build_ast()
  File "/usr/lib/python3/dist-packages/flake8/processor.py", line 211, in 
build_ast
    return compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST)
  File "<string>", line 2
SyntaxError: keyword argument repeated

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 666, in 
_run_checks_from_queue
    checker.run_checks(results_queue, statistics_queue)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 606, in 
run_checks
    self.run_ast_checks()
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 504, in 
run_ast_checks
    row, column = self._extract_syntax_information(exception)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 488, in 
_extract_syntax_information
    lines = physical_line.rstrip('\n').split('\n')
AttributeError: 'NoneType' object has no attribute 'rstrip'

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: flake8 3.2.1-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
CurrentDesktop: X-Cinnamon
Date: Mon Jun 12 15:44:52 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-19 (1423 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
PackageArchitecture: all
SourcePackage: python-flake8
UpgradeStatus: Upgraded to zesty on 2017-05-31 (12 days ago)

** Affects: python-flake8 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug zesty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1697447

Title:
  flake8 cause trace error on double keyword argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-flake8/+bug/1697447/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to