Repository: conda/conda

Issue:
TypeError resulting from conda create
I've just installed anaconda2 on a CentOS 6.8 instance. Now I'm trying to create a new conda environment but am receiving this error:

```
[ebrown@AWS-SYD-AL-T2MIC-SWM-P-ANACONDA01 ~]$ conda create --name testenv python
Fetching package metadata .......
Solving package specifications .............
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda/issues

Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "/anaconda/bin/conda", line 6, in <module>
    sys.exit(main())
  File "/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 120, in main
    args_func(args, p)
  File "/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 127, in args_func
    args.func(args, p)
  File "/anaconda/lib/python2.7/site-packages/conda/cli/main_create.py", line 57, in execute
    install(args, parser, 'create')
  File "/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 315, in install
    shortcuts=shortcuts)
  File "/anaconda/lib/python2.7/site-packages/conda/plan.py", line 461, in install_actions
    shortcuts=shortcuts)
  File "/anaconda/lib/python2.7/site-packages/conda/plan.py", line 333, in ensure_linked_actions
    actions[inst.LINK].append(dist, LINK_COPY, shortcuts)
TypeError: append() takes exactly one argument (3 given)
```

Here is my conda info:

```
[ebrown@AWS-SYD-AL-T2MIC-SWM-P-ANACONDA01 ~]$ conda info
Current conda install:

             platform : linux-64
        conda version : 4.1.0
  conda-build version : 1.20.0
       python version : 2.7.11.final.0
     requests version : 2.9.1
     root environment : /anaconda  (writable)
  default environment : /anaconda
     envs directories : /anaconda/envs
        package cache : /anaconda/pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/linux-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : None
    is foreign system : False
```

I'm at a loss as to why this is happening, can anyone help?

Thanks



Discussion:
https://github.com/conda/conda/blob/master/conda/plan.py#L330-L333

Line 333 should mimic the structure of line 330.

ahhh, switching assignment :)

Somebody needs to write a bot for github: feed bot stacktrace, assign bug to last person to touch line that triggered stack trace.

At some point it'll make sense to add [mention-bot](https://github.com/facebook/mention-bot) to conda.

No need to reassign, @msarahan, I've got this.


Resolving patch:
diff --git a/conda/plan.py b/conda/plan.py
--- a/conda/plan.py
+++ b/conda/plan.py
@@ -330,7 +330,7 @@ def ensure_linked_actions(dists, prefix, index=None, force=False,
             actions[inst.LINK].append('%s %d %s' % (dist, lt, shortcuts))
 
         except (OSError, IOError):
-            actions[inst.LINK].append(dist, LINK_COPY, shortcuts)
+            actions[inst.LINK].append('%s %d %s' % (dist, LINK_COPY, shortcuts))
         finally:
             if not extracted_in:
                 # Remove the dummy data


Test patch: