*** This bug is a duplicate of bug 1560134 ***
https://bugs.launchpad.net/bugs/1560134
Public bug reported:
$ cat x/__init__.py
def greet(name):
print("Hello, %s. Happy to see you." % name)
$ cat x/welcome.py
from . import greet
if __name__ == '__main__':
import sys
greet(sys.argv[1])
# python -m x.welcome Scott
Hello, Scott. Happy to see you.
# python3 -m x.welcome Scott
Hello, Scott. Happy to see you.
# python -m pyflakes x/
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/pyflakes/__main__.py", line 5, in
<module>
main(prog='pyflakes')
File "/usr/lib/python2.7/dist-packages/pyflakes/api.py", line 184, in main
warnings = checkRecursive(args, reporter)
File "/usr/lib/python2.7/dist-packages/pyflakes/api.py", line 141, in
checkRecursive
warnings += checkPath(sourcePath, reporter)
File "/usr/lib/python2.7/dist-packages/pyflakes/api.py", line 108, in
checkPath
return check(codestr, filename, reporter)
File "/usr/lib/python2.7/dist-packages/pyflakes/api.py", line 69, in check
w = checker.Checker(tree, filename)
File "/usr/lib/python2.7/dist-packages/pyflakes/checker.py", line 416, in
__init__
self.handleChildren(tree)
File "/usr/lib/python2.7/dist-packages/pyflakes/checker.py", line 738, in
handleChildren
self.handleNode(node, tree)
File "/usr/lib/python2.7/dist-packages/pyflakes/checker.py", line 785, in
handleNode
handler(node)
File "/usr/lib/python2.7/dist-packages/pyflakes/checker.py", line 1164, in
IMPORTFROM
node.module, alias.name)
File "/usr/lib/python2.7/dist-packages/pyflakes/checker.py", line 212, in
__init__
full_name = module + '.' + self.real_name
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: pyflakes 1.2.2-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Tue May 10 14:29:53 2016
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
SourcePackage: pyflakes
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: pyflakes (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug uec-images xenial
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1580214
Title:
pyflakes stacktrace: TypeError: unsupported operand type(s) for +:
'NoneType' and 'str'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pyflakes/+bug/1580214/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs