# Buggy code
def _upload_recipe(self, ref, conanfile, retry, retry_wait, policy, remote):
    if policy != UPLOAD_POLICY_FORCE:
        remote_manifest = self._check_recipe_date(ref, remote)
    else:
        remote_manifest = None

    current_remote = self._registry.refs.get(ref)

    if remote != current_remote:
        complete_recipe_sources(self._remote_manager, self._cache, conanfile, ref)

    conanfile_path = self._cache.conanfile(ref)
    self._hook_manager.execute(
        "pre_upload_recipe", conanfile_path=conanfile_path, reference=ref, remote=remote
    )

    t1 = time.time()
    the_files = self._compress_recipe_files(ref)
    if policy == UPLOAD_POLICY_SKIP:
        return ref
    files_to_upload, deleted = self._recipe_files_to_upload(
        ref, policy, the_files, remote, remote_manifest
    )
    if files_to_upload or deleted:
        self._remote_manager.upload_recipe(
            ref, files_to_upload, deleted, remote, retry, retry_wait
        )
        self._upload_recipe_end_msg(ref, remote)
    else:
        self._user_io.out.info("Recipe is up to date, upload skipped")
    duration = time.time() - t1
    log_recipe_upload(ref, duration, the_files, remote.name)
    self._hook_manager.execute(
        "post_upload_recipe",
        conanfile_path=conanfile_path,
        reference=ref,
        remote=remote,
    )

    # The recipe wasn't in the registry or it has changed the revision field only
    if not current_remote:
        self._registry.refs.set(ref, remote.name)

    return ref


# Traceback (AttributeError)
[b] $ sh -c "conan upload \* -r 090a7942-cd0f-45af-9347-465cbbe94a6e --confirm --all --no-overwrite "
MicroblinkConanFile/3.0.2@microblink/stable: Not found in local cache, looking in remotes...
MicroblinkConanFile/3.0.2@microblink/stable: Trying with '090a7942-cd0f-45af-9347-465cbbe94a6e'...
Downloading conanmanifest.txt

Downloading conanfile.py

MicroblinkConanFile/3.0.2@microblink/stable: Downloaded recipe revision 0
Uploading to remote '090a7942-cd0f-45af-9347-465cbbe94a6e':
Uploading CoreUtils/2.2.0@microblink/master to remote '090a7942-cd0f-45af-9347-465cbbe94a6e'
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/conans/client/command.py", line 1579, in run
method(args[0][1:])
File "/usr/lib/python3.7/site-packages/conans/client/command.py", line 1182, in upload
retry_wait=args.retry_wait, integrity_check=args.check)
File "/usr/lib/python3.7/site-packages/conans/client/conan_api.py", line 93, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/conans/client/conan_api.py", line 868, in upload
retry_wait, integrity_check, policy, remote_name, query=query)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 88, in upload
integrity_check, policy, remote, upload_recorder)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 190, in _upload_ref
self._upload_recipe(ref, conanfile, retry, retry_wait, policy, recipe_remote)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 230, in _upload_recipe
remote, remote_manifest)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 344, in _recipe_files_to_upload
if remote_manifest == local_manifest:
File "/usr/lib/python3.7/site-packages/conans/model/manifest.py", line 132, in __eq__
return self.file_sums == other.file_sums
AttributeError: 'NoneType' object has no attribute 'file_sums'

ERROR: 'NoneType' object has no attribute 'file_sums'

# Fixed code
def _upload_recipe(self, ref, conanfile, retry, retry_wait, policy, remote):
    current_remote = self._registry.refs.get(ref)
    if remote != current_remote:
        complete_recipe_sources(self._remote_manager, self._cache, conanfile, ref)

    conanfile_path = self._cache.conanfile(ref)
    self._hook_manager.execute(
        "pre_upload_recipe", conanfile_path=conanfile_path, reference=ref, remote=remote
    )

    t1 = time.time()
    the_files = self._compress_recipe_files(ref)
    local_manifest = FileTreeManifest.loads(load(the_files["conanmanifest.txt"]))

    remote_manifest = None
    if policy != UPLOAD_POLICY_FORCE:
        remote_manifest = self._check_recipe_date(ref, remote, local_manifest)
    if policy == UPLOAD_POLICY_SKIP:
        return ref

    files_to_upload, deleted = self._recipe_files_to_upload(
        ref, policy, the_files, remote, remote_manifest, local_manifest
    )

    if files_to_upload or deleted:
        self._remote_manager.upload_recipe(
            ref, files_to_upload, deleted, remote, retry, retry_wait
        )
        self._upload_recipe_end_msg(ref, remote)
    else:
        self._user_io.out.info("Recipe is up to date, upload skipped")
    duration = time.time() - t1
    log_recipe_upload(ref, duration, the_files, remote.name)
    self._hook_manager.execute(
        "post_upload_recipe",
        conanfile_path=conanfile_path,
        reference=ref,
        remote=remote,
    )

    # The recipe wasn't in the registry or it has changed the revision field only
    if not current_remote:
        self._registry.refs.set(ref, remote.name)

    return ref