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

coverage run --debug=sys fails with: 'CoverageData' object has no attribute 'filename' #907

Closed
nedbat opened this issue Dec 28, 2019 · 2 comments
Labels
bug Something isn't working fixed
Milestone

Comments

@nedbat
Copy link
Owner

nedbat commented Dec 28, 2019

$ coverage run --debug=sys foo.py
Traceback (most recent call last):
  File ".tox/py36/bin/coverage", line 11, in <module>
    load_entry_point('coverage', 'console_scripts', 'coverage')()
  File "/Users/ned/coverage/trunk/coverage/cmdline.py", line 824, in main
    status = CoverageScript().command_line(argv)
  File "/Users/ned/coverage/trunk/coverage/cmdline.py", line 555, in command_line
    return self.do_run(options, args)
  File "/Users/ned/coverage/trunk/coverage/cmdline.py", line 700, in do_run
    self.coverage.start()
  File "/Users/ned/coverage/trunk/coverage/control.py", line 516, in start
    self._post_init()
  File "/Users/ned/coverage/trunk/coverage/control.py", line 282, in _post_init
    self._write_startup_debug()
  File "/Users/ned/coverage/trunk/coverage/control.py", line 300, in _write_startup_debug
    write_formatted_info(self._debug, "sys", self.sys_info())
  File "/Users/ned/coverage/trunk/coverage/control.py", line 1008, in sys_info
    ('data_file', self._data.filename if self._data else "-none-"),
AttributeError: 'CoverageData' object has no attribute 'filename'
@nedbat nedbat added the bug Something isn't working label Dec 28, 2019
@nedbat nedbat added this to the 5.0.2 milestone Dec 28, 2019
nedbat added a commit that referenced this issue Dec 28, 2019
@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2019

Fixed in 903d2de

@nedbat nedbat closed this as completed Dec 28, 2019
@nedbat nedbat added the fixed label Dec 28, 2019
@nedbat
Copy link
Owner Author

nedbat commented Jan 5, 2020

This is now available in coverage 5.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

1 participant