def get_published_resources(self, references):
        def _get_not_found_refs(requested_refs, found_refs):
            not_found_refs = References()
            for block_version, cell_names in requested_refs.iteritems():
                version_resources = found_refs.get(block_version, {})
                missing = cell_names.difference(version_resources)
                if missing:
                    not_found_refs[block_version] = missing
            return not_found_refs

        # Read from localDB first, if not present, read from remote and catch!
        for block_version in references.keys():
            try:
                self.get_version_delta_info(block_version)
            except NotFoundException:
                self._out.error("Block %s has been deleted from server"
                                        % str(block_version))
                references.pop(block_version)
        local_refs = self._store.get_published_resources(references)
        not_found_refs = _get_not_found_refs(references, local_refs)

        # Read from remote building references
        remote_refs = ReferencedResources()
        if len(not_found_refs) > 0:
            logger.info("NOT In localdb: %s" % str(not_found_refs))
            for ref in not_found_refs:
                if ref.block not in self._retrieved_blocks:
                    self._out.info("Downloading files from: %s" % ref.block.to_pretty())
                    self._retrieved_blocks.add(ref.block)
            remote_refs = self._restapi_manager.get_published_resources(not_found_refs)

        # Cache return in local database (and prepare return)
        if len(remote_refs) > 0:
            logger.debug("Remote read: %r" % remote_refs.explode().keys())
            self._store.create_published_resources(remote_refs)

        all_refs = local_refs + remote_refs
        not_found_refs = _get_not_found_refs(references, all_refs)
        if not_found_refs:
            self._out.error("The following files "
                            "could not be retrieved %s" % not_found_refs)

        return all_refs
report an error using traceback.print_exc()
dataset/ETHPy150Open biicode/client/api/biiapi_proxy.py/BiiAPIProxy.get_published_resources--crossover with--dataset/ETHPy150Open cjlee112/pygr/pygr/coordinator.py/Processor.report_error