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

UnboundLocalError: local variable 'name_tokens' referenced before assignment #104

Open
marmistrz opened this issue Jun 3, 2017 · 1 comment

Comments

@marmistrz
Copy link

$ cppclean .
Traceback (most recent call last):
  File "/usr/bin/cppclean", line 145, in <module>
    sys.exit(main())
  File "/usr/bin/cppclean", line 138, in main
    quiet=args.quiet):
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 597, in run
    hunter.find_warnings()
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 126, in find_warnings
    self._find_source_warnings()
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 542, in _find_source_warnings
    included_files, forward_declarations = self._read_and_parse_includes()
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 177, in _read_and_parse_includes
    module = self._get_module(node)
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 151, in _get_module
    ast_list = [_f for _f in builder.generate() if _f]
  File "/usr/lib/python3.6/site-packages/cpp/find_warnings.py", line 151, in <listcomp>
    ast_list = [_f for _f in builder.generate() if _f]
  File "/usr/lib/python3.6/site-packages/cpp/ast.py", line 651, in generate
    result = self._generate_one(token)
  File "/usr/lib/python3.6/site-packages/cpp/ast.py", line 675, in _generate_one
    return method()
  File "/usr/lib/python3.6/site-packages/cpp/ast.py", line 1180, in handle_struct
    return self._handle_class_and_struct(Struct)
  File "/usr/lib/python3.6/site-packages/cpp/ast.py", line 1174, in _handle_class_and_struct
    return self._get_class(class_type, None)
  File "/usr/lib/python3.6/site-packages/cpp/ast.py", line 1507, in _get_class
    name_tokens = [class_token] + name_tokens
UnboundLocalError: local variable 'name_tokens' referenced before assignment

Arch Linux, installed from pip

@myint
Copy link
Owner

myint commented Jun 3, 2017

@marmistrz What is contained in .?

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

2 participants