Skip to content

'NoneType' object has no attribute 'has_file' #171

Description

@dimaqq

I'm trying to diff a couple of files generated by python coverage tool and converted to XML.

I get an exception here:

    383 def file_source(self, filename):
    384     """
    385     Return a list of namedtuple `Line` for each line of code found in the
    386     given file `filename`.
    387 
    388     """
--> 389     if self.cobertura1.has_file(filename) and self.cobertura1.filesystem.has_file(
    390         filename
    391     ):
    392         lines1 = self.cobertura1.source_lines(filename)
    393         line_statuses1 = dict(self.cobertura1.line_statuses(filename))

AttributeError: 'NoneType' object has no attribute 'has_file'

Somehow the 2nd clause, self.cobertura1.filesystem is None.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions