pyqver icon indicating copy to clipboard operation
pyqver copied to clipboard

Raises TypeError on files using relative import

Open perey opened this issue 11 years ago • 1 comments

At least, I'm pretty sure that relative imports are the only thing in common, across all modules producing the error below.

Traceback (most recent call last):
  File "<redacted>/pyqver3.py", line 267, in <module>
    ver = get_versions(source, fn)
  File "<redacted>/pyqver3.py", line 193, in get_versions
    checker.visit(tree)
  File "/usr/lib/python3.2/ast.py", line 248, in visit
    return visitor(node)
  File "/usr/lib/python3.2/ast.py", line 256, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.2/ast.py", line 248, in visit
    return visitor(node)
  File "<redacted>/pyqver3.py", line 174, in visit_ImportFrom
    name = node.module + "." + n.name
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

perey avatar Mar 21 '14 12:03 perey

Getting this, too...

benjaoming avatar Jan 23 '15 20:01 benjaoming