question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'Entry' object has no attribute 'qualified_name'

See original GitHub issue
------------------------------------------------------------
        answer = 0
        previous_digit = 0
        current_build = 0

        for character in text:
       ^
------------------------------------------------------------

slu/normalizers/age_normalizer.py:185:8: Compiler crash in IterationTransform

ModuleNode.body = StatListNode(age_normalizer.py:1:0)
StatListNode.stats[6] = StatListNode(age_normalizer.py:164:0)
StatListNode.stats[0] = PyClassDefNode(age_normalizer.py:164:0,
    doc = '\n    xxxxxxxxxx\n    ',
    name = 'ChineseNumberParser')
PyClassDefNode.body = StatListNode(age_normalizer.py:165:4)
StatListNode.stats[2] = CompilerDirectivesNode(age_normalizer.py:176:4)
CompilerDirectivesNode.body = StatListNode(age_normalizer.py:176:4)
StatListNode.stats[0] = DefNode(age_normalizer.py:176:4,
    is_cyfunction = True,
    is_staticmethod = True,
    modifiers = [...]/0,
    name = 'parse',
    needs_closure = True,
    np_args_idx = [...]/0,
    num_required_args = 1,
    outer_attrs = [...]/2,
    py_wrapper_required = True,
    reqd_kw_flags_cname = '0',
    used = True)
DefNode.body = StatListNode(age_normalizer.py:177:8,
    is_terminator = True)
StatListNode.stats[5] = ForInStatNode(age_normalizer.py:185:8)

Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "lib/python3.6/site-packages/Cython/Compiler/Optimize.py", line 190, in visit_ForInStatNode
    return self._optimise_for_loop(node, node.iterator.sequence)
  File "lib/python3.6/site-packages/Cython/Compiler/Optimize.py", line 200, in _optimise_for_loop
    if annotation.entry and annotation.entry.qualified_name == 'typing.Dict':
AttributeError: 'Entry' object has no attribute 'qualified_name'
Traceback (most recent call last):
  File "setup.py", line 17, in <module>
    "annotation_typing": False
  File "lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1097, in cythonize
    cythonize_one(*args)
  File "python3.6/site-packages/Cython/Build/Dependencies.py", line 1220, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: slu/normalizers/age_normalizer.py

It seems that Class Entry dont have a attribute named “qualified_name” in Cython/Compiler/Symtab.py. When add “qualified_name=None” in class defination, the error is gone.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
scodercommented, Feb 9, 2021

@da-woods I changed my mind after the fix (2019-04-14), but didn’t leave a message here why. Probably because it turned out that a backport wouldn’t be easy enough due to some infrastructure dependencies in the code.

0reactions
da-woodscommented, Feb 8, 2021

@scoder you tagged this with 0.29.7 but it looks like it only went into 3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Entry' object has no attribute 'set' - python - Stack Overflow
Sometimes when we pack or place any object in one line, where creating then this error shows. like, entry = Entry(root).pack() So avoid ......
Read more >
inspect — Inspect live objects — Python 3.11.1 documentation
fully qualified name with which this code object was defined. co_names ... If the parameter has no annotation, this attribute is set to...
Read more >
'entry' object has no attribute 'set' - You.com | The Search ...
A python str has no set method or attribute, a StringVar is specific to tkinter and what you are meant to be using....
Read more >
Understanding PyInstaller Hooks
If both PyInstaller and your package provide hooks for some module, ... This entry point refers to a function that will be invoked...
Read more >
Chapter 4, Object-Oriented Python - O'Reilly
A class is a Python object with several characteristics: ... references to attributes of the class must use a fully qualified name, not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found