Repository: conda/conda

Issue:
condo update --all
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues



Current conda install:

               platform : osx-64
          conda version : 4.3.15
       conda is private : False
      conda-env version : 4.3.15
    conda-build version : not installed
         python version : 3.6.0.final.0
       requests version : 2.12.4
       root environment : /Users/luisaalanizcastillo/anaconda  (writable)
    default environment : /Users/luisaalanizcastillo/anaconda
       envs directories : /Users/luisaalanizcastillo/anaconda/envs
                          /Users/luisaalanizcastillo/.conda/envs
          package cache : /Users/luisaalanizcastillo/anaconda/pkgs
                          /Users/luisaalanizcastillo/.conda/pkgs
           channel URLs : https://conda.anaconda.org/anaconda-fusion/osx-64
                          https://conda.anaconda.org/anaconda-fusion/noarch
                          https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /Users/luisaalanizcastillo/.condarc
           offline mode : False
             user-agent : conda/4.3.15 requests/2.12.4 CPython/3.6.0 Darwin/16.5.0 OSX/10.12.4
                UID:GID : 501:20



`$ /Users/luisaalanizcastillo/anaconda/bin/conda update --all`




    Traceback (most recent call last):
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/exceptions.py", line 591, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/cli/main.py", line 134, in _main
        exit_code = args.func(args, p)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/cli/main_update.py", line 65, in execute
        install(args, parser, 'update')
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/cli/install.py", line 359, in install
        execute_actions(actions, index, verbose=not context.quiet)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/plan.py", line 800, in execute_actions
        execute_instructions(plan, index, verbose)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/instructions.py", line 247, in execute_instructions
        cmd(state, arg)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/instructions.py", line 108, in UNLINKLINKTRANSACTION_CMD
        txn.execute()
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/core/link.py", line 262, in execute
        self.verify()
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/core/link.py", line 241, in verify
        self.prepare()
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/core/link.py", line 163, in prepare
        for lnkd_pkg_data in self.linked_packages_data_to_unlink)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/core/link.py", line 163, in <genexpr>
        for lnkd_pkg_data in self.linked_packages_data_to_unlink)
      File "/Users/luisaalanizcastillo/anaconda/lib/python3.6/site-packages/conda/core/link.py", line 65, in make_unlink_actions
        for trgt in linked_package_data.files)
    AttributeError: 'NoneType' object has no attribute 'files'



Discussion:
Can someone tell me what happened above that I couldn't update all packages with conda update --all
Hi @laacdm could you run the command in verbose mode and attach a .txt file with the whole output?

`$ /Users/luisaalanizcastillo/anaconda/bin/conda update --all -v -v -v`


Resolving patch:
diff --git a/conda/core/link.py b/conda/core/link.py
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -104,8 +104,9 @@ class UnlinkLinkTransaction(object):
     @classmethod
     def create_from_dists(cls, index, target_prefix, unlink_dists, link_dists):
         # This constructor method helps to patch into the 'plan' framework
-        linked_packages_data_to_unlink = tuple(load_meta(target_prefix, dist)
-                                               for dist in unlink_dists)
+        lnkd_pkg_data = (load_meta(target_prefix, dist) for dist in unlink_dists)
+        # TODO: figure out if this filter shouldn't be an assert not None
+        linked_packages_data_to_unlink = tuple(lpd for lpd in lnkd_pkg_data if lpd)
 
         log.debug("instantiating UnlinkLinkTransaction with\n"
                   "  target_prefix: %s\n"


Test patch: