へっぽこびんぼう野郎のnewbie日記

けろけーろ(´・ω・`)! #vZkt8fc6J

Resolving AttributeError: 'FlakesChecker' object has no attribute 'JOINEDSTR' on flake8

Error

Traceback (most recent call last):
  File "/root/.pyenv/versions/3.6.1/bin/flake8", line 11, in <module>
    sys.exit(main())
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/flake8/main.py", line 33, in main
    report = flake8_style.check_files()
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/flake8/engine.py", line 181, in check_files
    return self._retry_serial(self._styleguide.check_files, paths=paths)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/flake8/engine.py", line 172, in _retry_serial
    return func(*args, **kwargs)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pep8.py", line 1840, in check_files
    self.input_dir(path)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pep8.py", line 1876, in input_dir
    runner(os.path.join(root, filename))
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/flake8/engine.py", line 126, in input_file
    return fchecker.check_all(expected=expected, line_offset=line_offset)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pep8.py", line 1574, in check_all
    self.check_ast()
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pep8.py", line 1520, in check_ast
    checker = cls(tree, self.filename)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/flake8/_pyflakes.py", line 62, in __init__
    withDoctest=withDoctest)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 295, in __init__
    self.runDeferred(self._deferredFunctions)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 332, in runDeferred
    handler()
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 823, in runFunction
    self.handleNode(stmt, node)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 609, in handleNode
    handler(node)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 567, in handleChildren
    self.handleNode(node, tree)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 609, in handleNode
    handler(node)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 567, in handleChildren
    self.handleNode(node, tree)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 608, in handleNode
    handler = self.getNodeHandler(node.__class__)
  File "/root/.pyenv/versions/3.6.1/lib/python3.6/site-packages/pyflakes/checker.py", line 462, in getNodeHandler
    self._nodeHandlers[node_class] = handler = getattr(self, nodeType)
AttributeError: 'FlakesChecker' object has no attribute 'JOINEDSTR'

How to resolve

You probably use f"{foo}" syntax and older flake8. So update to latest flake8.