# Buggy code
def _compute_private_nodes(self, deps_graph, build_mode):
    """computes a list of nodes that are not required to be built, as they are
    private requirements of already available shared libraries as binaries
    """
    private_closure = deps_graph.private_nodes()
    skippable_nodes = []
    for private_node, private_requirers in private_closure:
        for private_requirer in private_requirers:
            conan_ref, conan_file = private_requirer
            package_id = conan_file.info.package_id()
            package_reference = PackageReference(conan_ref, package_id)
            package_folder = self._paths.package(package_reference)
            if not path_exists(package_folder, self._paths.store):
                if not self._force_build(conan_ref, build_mode):  # Not download package
                    self._user_io.out.info(
                        "Package for %s does not exist" % str(conan_ref)
                    )
                    if not self._retrieve_remote_package(package_reference):
                        break
        else:
            skippable_nodes.append(private_node)
    return skippable_nodes


# Traceback (AssertionError)
HEADER ONLY
Requirements
Boost/1.60.0@lasote/stable
catch/1.3.0@bjoern/testing
catch/1.3.0@bjoern/testing
filesystem/1.0.0@bjoern/testing
io/1.0.0@bjoern/testing
zlib/1.2.8@lasote/stable
Traceback (most recent call last):
File "/Users/bjoern/.pipsi/bin/conan", line 11, in <module>
sys.exit(run())
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/conan.py", line 6, in run
main(sys.argv[1:])
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/command.py", line 432, in main
error = command.run(args)
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/command.py", line 367, in run
method(args[0][1:])
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/command.py", line 186, in install
build_mode=args.build)
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/manager.py", line 122, in install
installer.install(deps_graph, build_mode)
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/installer.py", line 70, in install
skip_private_nodes = self._compute_private_nodes(deps_graph, build_mode)
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/client/installer.py", line 110, in _compute_private_nodes
package_folder = self._paths.package(package_reference)
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/paths.py", line 92, in package
return normpath(join(self.conan(package_reference.conan), PACKAGES_FOLDER,
File "/Users/bjoern/.pipsi/virtualenvs/conan/lib/python2.7/site-packages/conans/paths.py", line 45, in conan
assert isinstance(conan_reference, ConanFileReference)
AssertionError

# Fixed code
def _compute_private_nodes(self, deps_graph, build_mode):
    """computes a list of nodes that are not required to be built, as they are
    private requirements of already available shared libraries as binaries
    """
    private_closure = deps_graph.private_nodes()
    skippable_nodes = []
    for private_node, private_requirers in private_closure:
        for private_requirer in private_requirers:
            conan_ref, conan_file = private_requirer
            if conan_ref is None:
                continue
            package_id = conan_file.info.package_id()
            package_reference = PackageReference(conan_ref, package_id)
            package_folder = self._paths.package(package_reference)
            if not path_exists(package_folder, self._paths.store):
                if not self._force_build(conan_ref, build_mode):  # Not download package
                    self._user_io.out.info(
                        "Package for %s does not exist" % str(conan_ref)
                    )
                    if not self._retrieve_remote_package(package_reference):
                        break
        else:
            skippable_nodes.append(private_node)
    return skippable_nodes