[Pkg-freeipa-devel] Bug#891450: custodia FTBFS: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Adrian Bunk bunk at debian.org
Sun Feb 25 17:17:39 UTC 2018


Source: custodia
Version: 0.5.0-3
Severity: serious

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/custodia.html

...
==================== 67 passed, 43 skipped in 14.94 seconds ====================
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/coverage/cmdline.py", line 624, in do_run
    self.run_python_module(args[0], args)
  File "/usr/lib/python3/dist-packages/coverage/execfile.py", line 114, in run_python_module
    run_python_file(pathname, args, package=packagename, modulename=modulename, path0="")
  File "/usr/lib/python3/dist-packages/coverage/execfile.py", line 184, in run_python_file
    exec(code, main_mod.__dict__)
  File "/usr/lib/python3/dist-packages/pytest.py", line 73, in <module>
    raise SystemExit(pytest.main())
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/coverage/__main__.py", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/coverage/cmdline.py", line 753, in main
    status = CoverageScript().command_line(argv)
  File "/usr/lib/python3/dist-packages/coverage/cmdline.py", line 488, in command_line
    return self.do_run(options, args)
  File "/usr/lib/python3/dist-packages/coverage/cmdline.py", line 638, in do_run
    self.coverage.save()
  File "/usr/lib/python3/dist-packages/coverage/control.py", line 783, in save
    self.get_data()
  File "/usr/lib/python3/dist-packages/coverage/control.py", line 836, in get_data
    self._post_save_work()
  File "/usr/lib/python3/dist-packages/coverage/control.py", line 851, in _post_save_work
    self._warn_about_unmeasured_code(pkg)
  File "/usr/lib/python3/dist-packages/coverage/control.py", line 884, in _warn_about_unmeasured_code
    has_file = hasattr(mod, '__file__') and os.path.exists(mod.__file__)
  File "/build/1st/custodia-0.5.0/.tox/py36/lib/python3.6/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
ERROR: InvocationError: '/build/1st/custodia-0.5.0/.tox/py36/bin/python -m coverage run --parallel -m pytest --capture=no --strict --skip-servertests'
___________________________________ summary ____________________________________
ERROR:   py36: commands failed
make[1]: *** [debian/rules:22: override_dh_auto_test] Error 1


https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890844#45
  The fix is for third party packages to use `getattr(module, ‘__file__’, None)` instead of `hasattr(module, ‘__file__’)`.


More information about the Pkg-freeipa-devel mailing list