Repository: conda/conda

Issue:
source activate env error
**I'm submitting a...**
  - [x] bug report
  - [ ] feature request


### Current Behavior
when i try to activate a conda env,this doesn't work for me
the output is:
```
Traceback (most recent call last):
  File "/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit
    msg = self.format(record)
  File "/anaconda/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/anaconda/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
  File "/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__
    return '%s: %s' % (self.__class__.__name__, text_type(self))
  File "/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__
    return text_type(self.message % self._kwargs)
ValueError: unsupported format character '{' (0x7b) at index 513
Logged from file exceptions.py, line 724
```

### Steps to Reproduce
i have regularly updated conda to the lateset version recently,
and i installed pipenv.i know that cannot work with a conda-created  env,
but i suspect this may lead to this error
then this error came

### Expected Behavior
<!-- What do you think should happen? -->


##### `conda info`
<!-- between the ticks below, paste the output of 'conda info' -->
```
     active environment : None
            shell level : 0
       user config file : /Users/bubu/.condarc
 populated config files : /Users/bubu/.condarc
          conda version : 4.4.7
    conda-build version : 3.2.1
         python version : 2.7.13.final.0
       base environment : /anaconda  (writable)
           channel URLs : https://conda.anaconda.org/anaconda-fusion/osx-64
                          https://conda.anaconda.org/anaconda-fusion/noarch
                          https://repo.continuum.io/pkgs/main/osx-64
                          https://repo.continuum.io/pkgs/main/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
          package cache : /anaconda/pkgs
                          /Users/bubu/.conda/pkgs
       envs directories : /anaconda/envs
                          /Users/bubu/.conda/envs
               platform : osx-64
             user-agent : conda/4.4.7 requests/2.18.4 CPython/2.7.13 Darwin/17.3.0 OSX/10.13.2
                UID:GID : 501:20
             netrc file : None
           offline mode : False
```


##### `conda config --show-sources`
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /Users/bubu/.condarc <==
ssl_verify: True
channels:
  - anaconda-fusion
  - defaults
```


##### `conda list --show-channel-urls`
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /anaconda:
#
_license                  1.1                      py27_1    defaults
alabaster                 0.7.9                    py27_0    defaults
amqp                      1.4.9                     <pip>
anaconda                  custom                   py27_0    defaults
anaconda-client           1.6.3                    py27_0    defaults
anaconda-navigator        1.5.2                    py27_0    defaults
anaconda-project          0.4.1                    py27_0    defaults
ansible                   2.4.1.0                   <pip>
apipkg                    1.4                       <pip>
appdirs                   1.4.3                     <pip>
appnope                   0.1.0                    py27_0    defaults
appscript                 1.0.1                    py27_0    defaults
argcomplete               1.0.0                    py27_1    defaults
argon2-cffi               16.3.0                    <pip>
astroid                   1.4.9                    py27_0    defaults
astropy                   1.3.3               np112py27_0    defaults
attrs                     17.2.0                    <pip>
autobahn                  17.7.1                    <pip>
Automat                   0.6.0                     <pip>
babel                     2.3.4                    py27_0    defaults
backports                 1.0                      py27_0    defaults
backports.weakref         1.0rc1                    <pip>
backports_abc             0.5                      py27_0    defaults
bcrypt                    3.1.4                     <pip>
beautifulsoup4            4.5.3                    py27_0    defaults
billiard                  3.3.0.23                  <pip>
binaryornot               0.4.3                     <pip>
bitarray                  0.8.1                    py27_0    defaults
blaze                     0.10.1                   py27_0    defaults
bleach                    2.0.0                     <pip>
bokeh                     0.12.4                   py27_0    defaults
boto                      2.45.0                   py27_0    defaults
bottle                    0.12.13                   <pip>
bottle-sqlite             0.1.3                     <pip>
bottleneck                1.2.1               np112py27_0    defaults
ca-certificates           2017.08.26           ha1e5d58_0    defaults
cache-client              0.1.0                     <pip>
cdecimal                  2.3                      py27_2    defaults
celery                    3.1.23                    <pip>
certifi                   2017.11.5        py27hfa9a1c4_0    defaults
certifi                   2017.4.17                 <pip>
cffi                      1.9.1                    py27_0    defaults
Chameleon                 3.1                       <pip>
chardet                   2.3.0                    py27_0    defaults
chardet                   3.0.3                     <pip>
check-manifest            0.35                      <pip>
chest                     0.2.3                    py27_0    defaults
click                     6.7                      py27_0    defaults
click-default-group       1.2                       <pip>
cloudpickle               0.2.2                    py27_0    defaults
clyent                    1.2.2                    py27_0    defaults
colorama                  0.3.7                    py27_0    defaults
conda                     4.4.7                    py27_0    defaults
conda-build               3.2.1                    py27_0    defaults
conda-env                 2.6.0                h36134e3_0    defaults
conda-verify              2.0.0                    py27_0    defaults
configobj                 5.0.6                    py27_0    defaults
configparser              3.5.0                    py27_0    defaults
constantly                15.1.0                    <pip>
contextlib2               0.5.4                    py27_0    defaults
cookiecutter              1.5.1                     <pip>
crockford                 0.0.2                     <pip>
cryptography              1.7.1                    py27_0    defaults
cssselect                 1.0.1                     <pip>
curl                      7.52.1                        0    defaults
cvxopt                    1.1.9                     <pip>
cycler                    0.10.0                   py27_0    defaults
cython                    0.25.2                   py27_0    defaults
cytoolz                   0.8.2                    py27_0    defaults
dask                      0.13.0                   py27_0    defaults
datashape                 0.5.4                    py27_0    defaults
decorator                 4.0.11                   py27_0    defaults
defusedxml                0.5.0                     <pip>
devpi                     2.2.0                     <pip>
devpi-client              3.0.0                     <pip>
devpi-common              3.1.0                     <pip>
devpi-server              4.3.0                     <pip>
devpi-web                 3.2.0                     <pip>
dill                      0.2.5                    py27_0    defaults
Django                    1.10.5                    <pip>
django-extensions         1.7.9                     <pip>
django-filter             1.0.1                     <pip>
django-rest-swagger       2.1.1                     <pip>
django-silk               0.7.3                     <pip>
djangorestframework       3.5.4                     <pip>
djangorestframework-bulk  0.2.1                     <pip>
dlib                      19.4.0                    <pip>
docopt                    0.6.2                     <pip>
docutils                  0.13.1                   py27_0    defaults
dpkt                      1.9.1                     <pip>
dry-rest-permissions      0.1.8                     <pip>
entrypoints               0.2.2                    py27_0    defaults
entrypoints               0.2.2                     <pip>
enum34                    1.1.6                    py27_0    defaults
environment-kernels       1.1                       <pip>
et_xmlfile                1.0.1                    py27_0    defaults
etu-tools                 0.3.0                     <pip>
execnet                   1.4.1                     <pip>
factory-boy               2.8.1                     <pip>
fake-useragent            0.1.7                     <pip>
Faker                     0.7.12                    <pip>
falcon                    1.2.0                     <pip>
fastcache                 1.0.2                    py27_1    defaults
filelock                  2.0.7                    py27_0    defaults
fire                      0.1.2                     <pip>
first                     2.0.1                     <pip>
flake8                    3.3.0                     <pip>
Flask                     0.3                       <pip>
flask                     0.12                     py27_0    defaults
flask-cors                3.0.2                    py27_0    defaults
Flask-Login               0.4.0                     <pip>
freetype                  2.5.5                         2    defaults
funcsigs                  1.0.2                    py27_0    defaults
functools32               3.2.3.2                  py27_0    defaults
future                    0.16.0                    <pip>
futures                   3.0.5                    py27_0    defaults
GB2260                    0.4.1                     <pip>
gdbn                      0.1                       <pip>
get_terminal_size         1.0.0                    py27_0    defaults
gevent                    1.2.2                     <pip>
gevent                    1.2.1                    py27_0    defaults
Glances                   2.9.1                     <pip>
glob2                     0.6              py27h55c9705_0    defaults
gnumpy                    0.2                       <pip>
greenlet                  0.4.12                    <pip>
greenlet                  0.4.11                   py27_0    defaults
grequests                 0.3.0                     <pip>
grin                      1.2.1                    py27_3    defaults
gunicorn                  19.7.1                    <pip>
gym                       0.9.3                     <pip>
h5py                      2.7.0               np112py27_0    defaults
hdf5                      1.8.17                        1    defaults
heapdict                  1.0.0                    py27_1    defaults
hkdf                      0.0.3                     <pip>
holidays                  0.8.1                     <pip>
html5lib                  0.999999999               <pip>
humanize                  0.5.1                     <pip>
hupper                    1.0                       <pip>
hyperlink                 17.3.0                    <pip>
icu                       54.1                          0    defaults
idna                      2.6                       <pip>
idna                      2.2                      py27_0    defaults
imagesize                 0.7.1                    py27_0    defaults
incremental               17.5.0                    <pip>
ipaddress                 1.0.18                   py27_0    defaults
ipykernel                 4.5.2                    py27_0    defaults
ipykernel                 4.6.1                     <pip>
ipython                   5.1.0                    py27_1    defaults
ipython                   5.4.1                     <pip>
ipython_genutils          0.1.0                    py27_0    defaults
ipywidgets                6.0.0                     <pip>
ipywidgets                5.2.2                    py27_1    defaults
isbnlib                   3.7.2                     <pip>
isort                     4.2.5                    py27_0    defaults
itchat                    1.3.10                    <pip>
itsdangerous              0.24                     py27_0    defaults
jbig                      2.1                           0    defaults
jdcal                     1.3                      py27_0    defaults
jedi                      0.10.2                    <pip>
jedi                      0.9.0                    py27_1    defaults
jieba                     0.39                      <pip>
jinja2                    2.9.4                    py27_0    defaults
jinja2-time               0.2.0                     <pip>
joblib                    0.11                      <pip>
jpeg                      9b                            0    defaults
js2xml                    0.3.1                     <pip>
json-lines                0.3.1                     <pip>
jsonschema                2.5.1                    py27_0    defaults
jsonschema                2.6.0                     <pip>
jupyter                   1.0.0                    py27_3    defaults
jupyter-client            5.0.1                     <pip>
jupyter-core              4.3.0                     <pip>
jupyter_client            4.4.0                    py27_0    defaults
jupyter_console           5.0.0                    py27_0    defaults
jupyter_core              4.2.1                    py27_0    defaults
kii-client                0.1.3                     <pip>
kombu                     3.0.37                    <pip>
lazy-object-proxy         1.2.2                    py27_0    defaults
libiconv                  1.14                          0    defaults
libpng                    1.6.27                        0    defaults
libtiff                   4.0.6                         3    defaults
libxml2                   2.9.4                         0    defaults
libxslt                   1.1.29                        0    defaults
line-profiler             2.0                       <pip>
llvmlite                  0.18.0                   py27_0    defaults
locket                    0.2.0                    py27_1    defaults
lxml                      3.7.2                    py27_0    defaults
magic-wormhole            0.10.2                    <pip>
Markdown                  2.2.0                     <pip>
markupsafe                0.23                     py27_2    defaults
matplotlib                2.0.2               np112py27_0    defaults
mccabe                    0.6.1                     <pip>
meld3                     1.0.2                     <pip>
mistune                   0.7.4                     <pip>
mistune                   0.7.3                    py27_1    defaults
mkl                       2017.0.1                      0    defaults
mkl-service               1.1.2                    py27_3    defaults
more-itertools            3.2.0                     <pip>
mpmath                    0.19                     py27_1    defaults
multipledispatch          0.4.9                    py27_0    defaults
mysql                     0.0.1                     <pip>
MySQL-python              1.2.5                     <pip>
nbconvert                 4.2.0                    py27_0    defaults
nbconvert                 5.2.1                     <pip>
nbformat                  4.2.0                    py27_0    defaults
nbformat                  4.3.0                     <pip>
ncmbot                    0.1.6                     <pip>
networkx                  1.11                     py27_0    defaults
nlib                      0.6                       <pip>
nltk                      3.2.2                    py27_0    defaults
nolearn                   0.5b1                     <pip>
nose                      1.3.7                    py27_1    defaults
notebook                  5.0.0                     <pip>
notebook                  4.3.1                    py27_0    defaults
numba                     0.33.0              np112py27_0    defaults
numexpr                   2.6.2               np112py27_0    defaults
numpy                     1.12.1                   py27_0    defaults
numpydoc                  0.6.0                    py27_0    defaults
odo                       0.5.0                    py27_1    defaults
olefile                   0.44                      <pip>
openapi-codec             1.3.2                     <pip>
opencv-python             3.2.0.7                   <pip>
openface                  0.2.1                     <pip>
openpyxl                  2.4.1                    py27_0    defaults
openssl                   1.0.2n               hdbc3d79_0    defaults
org-client                0.4.12                    <pip>
packaging                 16.8                      <pip>
pandas                    0.17.1                    <pip>
pandas                    0.20.2              np112py27_0    defaults
pandocfilters             1.4.1                     <pip>
paramiko                  2.3.1                     <pip>
parse-accept-language     0.1.2                     <pip>
parsel                    1.2.0                     <pip>
partd                     0.3.7                    py27_0    defaults
passlib                   1.7.1                     <pip>
PasteDeploy               1.5.2                     <pip>
path.py                   10.0                     py27_0    defaults
pathlib                   1.0.1                     <pip>
pathlib2                  2.2.0                    py27_0    defaults
patsy                     0.4.1                    py27_0    defaults
pendulum                  1.0.2                     <pip>
pep8                      1.7.0                    py27_0    defaults
petl                      1.1.1                     <pip>
pew                       1.1.2                     <pip>
pexpect                   4.2.1                    py27_0    defaults
pickleshare               0.7.4                    py27_0    defaults
pigar                     0.7.0                     <pip>
pillow                    4.0.0                    py27_0    defaults
pip                       9.0.1            py27h1567d89_4    defaults
pip-tools                 1.9.0                     <pip>
pipreqs                   0.4.9                     <pip>
pkginfo                   1.4.1                     <pip>
pkginfo                   1.4.1                    py27_0    defaults
pluggy                    0.4.0                     <pip>
ply                       3.9                      py27_0    defaults
poyo                      0.4.1                     <pip>
pprofile                  1.11.0                    <pip>
profiling                 0.1.3                     <pip>
progressbar               2.3                       <pip>
prompt_toolkit            1.0.9                    py27_0    defaults
protobuf                  3.3.0                     <pip>
psutil                    5.0.1                    py27_0    defaults
psycopg2                  2.7.1                     <pip>
ptpython                  0.39                      <pip>
ptyprocess                0.5.1                    py27_0    defaults
py                        1.4.32                   py27_0    defaults
py-heat                   0.0.2                     <pip>
py-heat-magic             0.0.2                     <pip>
pyasn1                    0.1.9                    py27_0    defaults
pyasn1-modules            0.0.10                    <pip>
pyaudio                   0.2.7                    py27_0    defaults
pycodestyle               2.3.1                     <pip>
pycosat                   0.6.3            py27h6c51c7e_0    defaults
pycparser                 2.17                     py27_0    defaults
pycrypto                  2.6.1                    py27_4    defaults
pycurl                    7.43.0                   py27_2    defaults
PyDispatcher              2.0.5                     <pip>
pyflakes                  1.5.0                    py27_0    defaults
pyglet                    1.2.4                     <pip>
pygments                  2.1.3                    py27_0    defaults
pylint                    1.6.4                    py27_1    defaults
pymongo                   3.5.1                     <pip>
PyMySQL                   0.7.11                    <pip>
PyNaCl                    1.1.2                     <pip>
pyopenssl                 16.2.0                   py27_0    defaults
pyparsing                 2.1.4                    py27_0    defaults
pyparsing                 2.2.0                     <pip>
pypng                     0.0.18                    <pip>
PyQRCode                  1.2.1                     <pip>
pyqt                      5.6.0                    py27_1    defaults
pyquery                   1.3.0                     <pip>
pyramid                   1.8.3                     <pip>
pyramid-chameleon         0.3                       <pip>
pyresttest                1.7.2.dev0                <pip>
pyspider                  0.3.9                     <pip>
pytables                  3.3.0               np112py27_0    defaults
pytest                    3.0.5                    py27_0    defaults
python                    2.7.13                        0    defaults
python-cjson              1.2.1                     <pip>
python-dateutil           2.6.0                    py27_0    defaults
python-mimeparse          1.6.0                     <pip>
python.app                1.2                      py27_4    defaults
pythonpy                  0.4.11                    <pip>
pytz                      2016.10                  py27_0    defaults
pywavelets                0.5.2               np112py27_0    defaults
pyyaml                    3.12                     py27_0    defaults
pyzmq                     16.0.2                   py27_0    defaults
qiniu                     7.2.0                     <pip>
qt                        5.6.2                         0    defaults
qtawesome                 0.4.3                    py27_0    defaults
qtconsole                 4.2.1                    py27_1    defaults
qtmodern                  0.1.4                     <pip>
qtpy                      1.2.1                    py27_0    defaults
QtPy                      1.3.1                     <pip>
queuelib                  1.4.2                     <pip>
raven                     6.0.0                     <pip>
readline                  6.2                           2    defaults
readme-renderer           17.2                      <pip>
redis                     3.2.0                         0    defaults
redis-py                  2.10.5                   py27_0    defaults
repoze.lru                0.6                       <pip>
requestium                0.1.9                     <pip>
requests                  2.12.4                   py27_0    defaults
requests                  2.18.4                    <pip>
requests-file             1.4.2                     <pip>
rope                      0.9.4                    py27_1    defaults
ruamel_yaml               0.11.14                  py27_1    defaults
scandir                   1.4                      py27_0    defaults
scikit-image              0.13.0              np112py27_0    defaults
scikit-learn              0.18.2              np112py27_0    defaults
scikit-learn              0.17.1                    <pip>
scipy                     0.19.1              np112py27_0    defaults
scipy                     0.16.1                    <pip>
Scrapy                    1.4.0                     <pip>
seaborn                   0.7.1                    py27_0    defaults
selenium                  3.8.0                     <pip>
serpy                     0.1.1                     <pip>
service-identity          17.0.0                    <pip>
setuptools                38.4.0                   py27_0    defaults
setuptools                38.4.0                    <pip>
shutilwhich               1.1.0                     <pip>
simplegeneric             0.8.1                    py27_1    defaults
simplejson                3.11.1                    <pip>
singledispatch            3.4.0.3                  py27_0    defaults
sip                       4.18                     py27_0    defaults
six                       1.10.0                   py27_0    defaults
sklearn                   0.0                       <pip>
slimit                    0.8.1                     <pip>
snowballstemmer           1.2.1                    py27_0    defaults
sockjs-tornado            1.0.3                    py27_0    defaults
spake2                    0.7                       <pip>
speechpy                  1.1                       <pip>
sphinx                    1.5.1                    py27_0    defaults
spyder                    3.1.2                    py27_0    defaults
sqlalchemy                1.1.5                    py27_0    defaults
sqlite                    3.13.0                        0    defaults
ssl_match_hostname        3.4.0.2                  py27_1    defaults
sso-auth-drf              1.4.2                     <pip>
statsmodels               0.8.0               np112py27_0    defaults
subprocess32              3.2.7                    py27_0    defaults
supervisor                3.3.2                     <pip>
sympy                     1.0                      py27_0    defaults
tblib                     1.3.2                     <pip>
tensorflow                1.2.0                     <pip>
terminado                 0.6                      py27_0    defaults
terminaltables            3.1.0                     <pip>
testpath                  0.3.1                     <pip>
textrank4zh               0.3                       <pip>
tflearn                   0.3.2                     <pip>
tk                        8.5.18                        0    defaults
tldextract                2.2.0                     <pip>
toolz                     0.8.2                    py27_0    defaults
tornado                   4.4.2                    py27_0    defaults
tornado                   4.5.1                     <pip>
tox                       2.7.0                     <pip>
tqdm                      4.15.0                    <pip>
traitlets                 4.3.1                    py27_0    defaults
translationstring         1.3                       <pip>
Twisted                   17.5.0                    <pip>
txaio                     2.8.1                     <pip>
txtorcon                  0.19.3                    <pip>
u-msgpack-python          2.4.1                     <pip>
unicodecsv                0.14.1                   py27_0    defaults
urllib3                   1.22                      <pip>
urwid                     1.3.1                     <pip>
valuedispatch             0.0.1                     <pip>
venusian                  1.1.0                     <pip>
virtualenv                15.1.0                    <pip>
virtualenv-clone          0.2.6                     <pip>
w3lib                     1.18.0                    <pip>
waitress                  1.0.2                     <pip>
wcwidth                   0.1.7                    py27_0    defaults
web.py                    0.38                      <pip>
webencodings              0.5.1                     <pip>
WebOb                     1.7.2                     <pip>
weibo                     0.2.2                     <pip>
Werkzeug                  0.12.1                    <pip>
werkzeug                  0.11.15                  py27_0    defaults
wheel                     0.29.0                   py27_0    defaults
whichcraft                0.4.1                     <pip>
Whoosh                    2.7.4                     <pip>
widgetsnbextension        2.0.0                     <pip>
widgetsnbextension        1.2.6                    py27_0    defaults
wrapt                     1.10.8                   py27_0    defaults
WsgiDAV                   2.2.4                     <pip>
xlrd                      1.0.0                    py27_0    defaults
xlsxwriter                0.9.6                    py27_0    defaults
xlwings                   0.10.2                   py27_0    defaults
xlwt                      1.2.0                    py27_0    defaults
xz                        5.2.2                         1    defaults
yaml                      0.1.6                         0    defaults
yarg                      0.1.9                     <pip>
zlib                      1.2.8                         3    defaults
zoo-client                0.7.8                     <pip>
zope.deprecation          4.2.0                     <pip>
zope.interface            4.4.1                     <pip>
```



Discussion:
Have the same issue after an update
The same issue +1
The same issue +1
Can someone who is having this problem please give me the output of

    CONDA_VERBOSE=3 conda shell.posix activate base
For people having this problem, please give me step-by-step setup and commands I can use to reproduce this myself.
```
→ source activate py3
Traceback (most recent call last):
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit
    msg = self.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__
    return '%s: %s' % (self.__class__.__name__, text_type(self))
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__
    return text_type(self.message % self._kwargs)
ValueError: unsupported format character '{' (0x7b) at index 447
Logged from file exceptions.py, line 724
```

```
→ CONDA_VERBOSE=3 conda shell.posix activate base

PS1='(base) '
export CONDA_DEFAULT_ENV='base'
export CONDA_PREFIX='/Users/sherbein/opt/miniconda2'
export CONDA_PROMPT_MODIFIER='(base) '
export CONDA_PYTHON_EXE='/Users/sherbein/opt/miniconda2/bin/python'
export CONDA_SHLVL='1'
export PATH='/Users/sherbein/opt/miniconda2/bin:/Users/sherbein/opt/miniconda2/bin:/Users/sherbein/.cargo/bin:/usr/local/bin:/usr/local/texlive/2016/bin/x86_64-darwin:/usr/local/sbin:/Users/sherbein/.dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/command-not-found:/Users/sherbein/.antigen/bundles/zsh-users/zsh-syntax-highlighting'
```
FWIW, I get the exact same error when I try and use `conda activate py3` (both before and after removing conda from my PATH and sourcing `conda.sh` in `etc/profile.d`)
@SteVwonder: Can you show the output of
```
/Users/sherbein/opt/miniconda2/bin/python -c 'import conda; conda.CondaError.__str__ = lambda self: "\n".join(map(conda.text_type, [self.message, self._kwargs])); from conda.cli.main import main; main("conda", "shell.posix", "activate", "py3")'
```
?
```
﻿﻿→ /Users/sherbein/opt/miniconda2/bin/python -c 'import conda; conda.CondaError.__str__ = lambda self: "\n".join(map(conda.text_type, [self.message, self._kwargs])); from conda.cli.main import main; main("conda", "shell.posix", "activate", "py3")'

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/cli/main.py", line 111, in main
        return activator_main()
      File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/activate.py", line 551, in main
        assert len(argv) >= 3
    AssertionError

`$ -c`

  environment variables:
                 CIO_TEST=<not set>
               CONDA_ROOT=/Users/sherbein/opt/miniconda2
                     PATH=/Users/sherbein/opt/miniconda2/bin:/Users/sherbein/.cargo/bin:/usr/loc
                          al/bin:/usr/local/texlive/2016/bin/x86_64-darwin:/usr/local/sbin:/User
                          s/sherbein/.dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
                          /Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/o
                          pt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/sherbein/
                          .antigen/bundles/robbyrussell/oh-my-
                          zsh/lib:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-
                          zsh/plugins/git:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-
                          zsh/plugins/command-not-found:/Users/sherbein/.antigen/bundles/zsh-
                          users/zsh-syntax-highlighting
          PKG_CONFIG_PATH=/Users/sherbein/.local/munge/0.5.13/lib/pkgconfig
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
              SUDO_EDITOR=emacsclient -nw

     active environment : None
       user config file : /Users/sherbein/.condarc
 populated config files :
          conda version : 4.4.7
    conda-build version : not installed
         python version : 2.7.14.final.0
       base environment : /Users/sherbein/opt/miniconda2  (writable)
           channel URLs : https://repo.continuum.io/pkgs/main/osx-64
                          https://repo.continuum.io/pkgs/main/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
          package cache : /Users/sherbein/opt/miniconda2/pkgs
                          /Users/sherbein/.conda/pkgs
       envs directories : /Users/sherbein/opt/miniconda2/envs
                          /Users/sherbein/.conda/envs
               platform : osx-64
             user-agent : conda/4.4.7 requests/2.18.4 CPython/2.7.14 Darwin/17.3.0 OSX/10.13.2
                UID:GID : 501:20
             netrc file : None
           offline mode : False
```
Ah, there was an error in the command I wrote down, sorry.
Can you try
```
/Users/sherbein/opt/miniconda2/bin/python -c 'import conda; conda.CondaError.__str__ = lambda self: "\n".join(map(conda.text_type, [self.message, self._kwargs])); from conda.cli.main import main; import sys; sys.argv[:]=["conda", "shell.posix", "activate", "py3"]; main()'
```
instead?
```
PS1='(py3) '
export CONDA_DEFAULT_ENV='py3'
export CONDA_PREFIX='/Users/sherbein/opt/miniconda2/envs/py3'
export CONDA_PROMPT_MODIFIER='(py3) '
export CONDA_PYTHON_EXE='/Users/sherbein/opt/miniconda2/bin/python'
export CONDA_SHLVL='1'
export PATH='/Users/sherbein/opt/miniconda2/envs/py3/bin:/Users/sherbein/opt/miniconda2/bin:/Users/sherbein/.cargo/bin:/usr/local/bin:/usr/local/texlive/2016/bin/x86_64-darwin:/usr/local/sbin:/Users/sherbein/.dotfiles/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/Users/sherbein/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/command-not-found:/Users/sherbein/.antigen/bundles/zsh-users/zsh-syntax-highlighting'
```
Now that's strange.. I don't understand how your previous `source activate py3` was able to error out. The Python code that gets executed by `source activate` should be the same as with `conda shell.posix activate py3` which didn't fail somehow...
Can you show
```
head /Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh
```
?
```
→ head /Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh
_CONDA_EXE="/Users/sherbein/opt/miniconda2/bin/conda"
_CONDA_ROOT="/Users/sherbein/opt/miniconda2"
_conda_set_vars() {
    # set _CONDA_SHELL_FLAVOR
    if [ -n "${BASH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=bash
    elif [ -n "${ZSH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=zsh
    elif [ -n "${KSH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=ksh
```
And you can still reproduce the error with `source activate py3`?
```
→ source activate py3
Traceback (most recent call last):
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit
    msg = self.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__
    return '%s: %s' % (self.__class__.__name__, text_type(self))
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__
    return text_type(self.message % self._kwargs)
ValueError: unsupported format character '{' (0x7b) at index 447
Logged from file exceptions.py, line 724

→ eval $(conda shell.posix activate py3)

→ which python
/Users/sherbein/opt/miniconda2/envs/py3/bin/python
```
What is
`which activate`
and
`cat $(which activate)`
?
```
→ which activate
/Users/sherbein/opt/miniconda2/bin/activate

→ cat $(which activate)
#!/bin/sh
_CONDA_ROOT="/Users/sherbein/opt/miniconda2"
#!/bin/sh

_conda_set_vars() {
    # set _CONDA_SHELL_FLAVOR
    if [ -n "${BASH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=bash
    elif [ -n "${ZSH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=zsh
    elif [ -n "${KSH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=ksh
    elif [ -n "${POSH_VERSION:+x}" ]; then
        _CONDA_SHELL_FLAVOR=posh
    else
        # https://unix.stackexchange.com/a/120138/92065
        local _q="$(ps -p$$ -o cmd="",comm="",fname="" 2>/dev/null | sed 's/^-//' | grep -oE '\w+' | head -n1)"
        if [ "$_q" = dash ]; then
            _CONDA_SHELL_FLAVOR=dash
        else
            (>&2 echo "Unrecognized shell.")
            return 1
        fi
    fi

    # https://unix.stackexchange.com/questions/4650/determining-path-to-sourced-shell-script/
    local script_dir
    case "$_CONDA_SHELL_FLAVOR" in
        bash) script_dir="$(dirname "${BASH_SOURCE[0]}")";;
        zsh) script_dir="$(dirname "${(%):-%x}")";;  # http://stackoverflow.com/a/28336473/2127762
        dash) x=$(lsof -p $$ -Fn0 | tail -1); script_dir="$(dirname "${x#n}")";;
        *) script_dir="$(cd "$(dirname "$_")" && echo "$PWD")";;
    esac

    if [ -z "${_CONDA_ROOT+x}" ]; then
        _CONDA_ROOT="$(dirname "$script_dir")"
    fi

}

_conda_script_is_sourced() {
    # http://stackoverflow.com/a/28776166/2127762
    sourced=0
    if [ -n "${ZSH_EVAL_CONTEXT:+x}" ]; then
      case $ZSH_EVAL_CONTEXT in *:file) sourced=1;; esac
    elif [ -n "${KSH_VERSION:+x}" ]; then
      [ "$(cd $(dirname -- $0) && pwd -P)/$(basename -- $0)" != "$(cd $(dirname -- ${.sh.file}) && pwd -P)/$(basename -- ${.sh.file})" ] && sourced=1
    elif [ -n "${BASH_VERSION:+x}" ]; then
      [ "${BASH_SOURCE[0]}" = "$0" ] && sourced=1
    else # All other shells: examine $0 for known shell binary filenames
      # Detects `sh` and `dash`; add additional shell filenames as needed.
      case ${0##*/} in sh|dash) sourced=0;; *) sourced=1;; esac
    fi
    return $sourced
}

if ! _conda_script_is_sourced; then
    (
      >&2 echo "Error: activate must be sourced. Run 'source activate envname'"
      >&2 echo "instead of 'activate envname'."
    )
    exit 1
fi

_conda_set_vars
. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
_conda_activate "$@"
```
I have still no clue..
What does
```
(set -x ; source activate py3)
```
output?
Oh.  Good call. That might be it.  I'm guessing this has to do with my zsh prompt (which I have been excluding from the above posts to hide my IP address/hostname, but is included here)
```
# sherbein at roaming-4-24-60.host.udel.edu in ~ [17:01:58]
→ (set -x ; source activate py3)
+-zsh:1> source activate py3
+/Users/sherbein/opt/miniconda2/bin/activate:2> _CONDA_ROOT=/Users/sherbein/opt/miniconda2
+/Users/sherbein/opt/miniconda2/bin/activate:57> _conda_script_is_sourced
+_conda_script_is_sourced:2> sourced=0
+_conda_script_is_sourced:3> [ -n x ']'
+_conda_script_is_sourced:4> case toplevel:file:shfunc (*:file)
+_conda_script_is_sourced:13> return 0
+/Users/sherbein/opt/miniconda2/bin/activate:65> _conda_set_vars
+_conda_set_vars:2> [ -n '' ']'
+_conda_set_vars:4> [ -n x ']'
+_conda_set_vars:5> _CONDA_SHELL_FLAVOR=zsh
+_conda_set_vars:22> local script_dir
+_conda_set_vars:23> case zsh (bash)
+_conda_set_vars:23> case zsh (zsh)
+_conda_set_vars:25> script_dir=+_conda_set_vars:25> dirname /Users/sherbein/opt/miniconda2/bin/activate
+_conda_set_vars:25> script_dir=/Users/sherbein/opt/miniconda2/bin
+_conda_set_vars:30> [ -z x ']'
+/Users/sherbein/opt/miniconda2/bin/activate:66> . /Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh
+/Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh:1> _CONDA_EXE=/Users/sherbein/opt/miniconda2/bin/conda
+/Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh:2> _CONDA_ROOT=/Users/sherbein/opt/miniconda2
+/Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh:105> _conda_set_vars
+_conda_set_vars:2> [ -n '' ']'
+_conda_set_vars:4> [ -n x ']'
+_conda_set_vars:5> _CONDA_SHELL_FLAVOR=zsh
+_conda_set_vars:15> [ -z x ']'
+_conda_set_vars:29> [ -z x ']'
+/Users/sherbein/opt/miniconda2/etc/profile.d/conda.sh:107> [ -z x ']'
+/Users/sherbein/opt/miniconda2/bin/activate:67> _conda_activate py3
+_conda_activate:1> [ -n '' ']'
+_conda_activate:8> local ask_conda
+_conda_activate:9> ask_conda=+_conda_activate:9> PS1=$'\n%{\C-[[1m\C-[[34m%}#%{\C-[[00m%} %{\C-[[36m%}%n %{\C-[[37m%}at %{\C-[[32m%}roaming-4-24-60.host.udel.edu %{\C-[[37m%}in %{\C-[[1m\C-[[33m%}${PWD/#$HOME/~}%{\C-[[00m%}$(ys_hg_prompt_info)$(git_prompt_info) %{\C-[[37m%}[%*]\n%{\C-[[1m\C-[[31m%}→ %{\C-[[00m%}' /Users/sherbein/opt/miniconda2/bin/conda shell.posix activate py3
Traceback (most recent call last):
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit
    msg = self.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 734, in format
    return fmt.format(record)
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 465, in format
    record.message = record.getMessage()
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/logging/__init__.py", line 329, in getMessage
    msg = msg % self.args
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__
    return '%s: %s' % (self.__class__.__name__, text_type(self))
  File "/Users/sherbein/opt/miniconda2/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__
    return text_type(self.message % self._kwargs)
ValueError: unsupported format character '{' (0x7b) at index 447
Logged from file exceptions.py, line 724
+_conda_activate:9> ask_conda=''
+_conda_activate:9> return 1
```
```
# sherbein at roaming-4-24-60.host.udel.edu in ~ [17:04:06]
→ export PS1="#"
#
#source activate py3
(py3) #
```
Running `conda config --set changeps1 False` fixed this problem for me. Thanks @mbargull for helping me track this down! I know how frustrating remote troubleshooting can be.  I appreciate your time and effort on this!
You're welcome. The funny thing is that the first things I tried was a `PS1='%}'` and `PS1='→'` 🙄 . The minimal working reproducer is the concatenation `PS1='%}→` 😆.
So the actual error is just
```
$ PS1=→
→source activate

EncodingError: A unicode encoding or decoding error has occurred.
Python 2 is the interpreter under which conda is running in your base environment.
Replacing your base environment with one having Python 3 may help resolve this issue.
If you still have a need for Python 2 environments, consider using 'conda create'
and 'conda activate'.  For example:

    $ conda create -n py2 python=2
    $ conda activate py2

Error details: UnicodeDecodeError('ascii', '\xe2\x86\x92', 0, 1, 'ordinal not in range(128)')

```
but that gets masked by another bug that happens during error reporting: https://github.com/conda/conda/issues/6759.
My general advice would be to always use Miniconda3 and use Python 2  in a separate environment, i.e.,
```
conda create -n py2 python=2
```
or if you use `anaconda` then
```
conda create -n anaconda2 python=2 anaconda
```
. That way, `conda` itself will always use Python 3 and doesn't run into those Unicode decoding errors.
Many thx! @mbargull fixed!
From https://github.com/conda/conda/issues/6753#issuecomment-359110810, the root-cause stack trace here is

```
Traceback (most recent call last):
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/cli/main.py", line 111, in main
    return activator_main()
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/activate.py", line 557, in main
    print(activator.execute(), end='')
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/activate.py", line 149, in execute
    return getattr(self, self.command)()
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/activate.py", line 135, in activate
    return self._finalize(self._yield_commands(self.build_activate(self.env_name_or_prefix)),
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/activate.py", line 267, in build_activate
    self._update_prompt(set_vars, conda_prompt_modifier)
  File "/Users/rthomas/bug/env/lib/python2.7/site-packages/conda/activate.py", line 456, in _update_prompt
    ps1 = ps1.replace("'", "'\"'\"'")
EncodingError: <unprintable EncodingError object>
```

Resolving patch:
diff --git a/conda/activate.py b/conda/activate.py
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -43,6 +43,12 @@ def __init__(self, shell, arguments=None):
         self.shell = shell
         self._raw_arguments = arguments
 
+        if PY2:
+            self.environ = {ensure_fs_path_encoding(k): ensure_fs_path_encoding(v)
+                            for k, v in iteritems(os.environ)}
+        else:
+            self.environ = os.environ.copy()
+
         if shell == 'posix':
             self.pathsep_join = ':'.join
             self.path_conversion = native_path_to_unix
@@ -215,13 +221,13 @@ def build_activate(self, env_name_or_prefix):
         prefix = normpath(prefix)
 
         # query environment
-        old_conda_shlvl = int(os.getenv('CONDA_SHLVL', 0))
-        old_conda_prefix = os.getenv('CONDA_PREFIX')
+        old_conda_shlvl = int(self.environ.get('CONDA_SHLVL', 0))
+        old_conda_prefix = self.environ.get('CONDA_PREFIX')
         max_shlvl = context.max_shlvl
 
         if old_conda_prefix == prefix:
             return self.build_reactivate()
-        if os.getenv('CONDA_PREFIX_%s' % (old_conda_shlvl-1)) == prefix:
+        if self.environ.get('CONDA_PREFIX_%s' % (old_conda_shlvl-1)) == prefix:
             # in this case, user is attempting to activate the previous environment,
             #  i.e. step back down
             return self.build_deactivate()
@@ -282,8 +288,8 @@ def build_activate(self, env_name_or_prefix):
 
     def build_deactivate(self):
         # query environment
-        old_conda_shlvl = int(os.getenv('CONDA_SHLVL', 0))
-        old_conda_prefix = os.getenv('CONDA_PREFIX', None)
+        old_conda_shlvl = int(self.environ.get('CONDA_SHLVL', 0))
+        old_conda_prefix = self.environ.get('CONDA_PREFIX', None)
         if old_conda_shlvl <= 0 or old_conda_prefix is None:
             return {
                 'unset_vars': (),
@@ -314,7 +320,7 @@ def build_deactivate(self):
             }
             activate_scripts = ()
         else:
-            new_prefix = os.getenv('CONDA_PREFIX_%d' % new_conda_shlvl)
+            new_prefix = self.environ.get('CONDA_PREFIX_%d' % new_conda_shlvl)
             conda_default_env = self._default_env(new_prefix)
             conda_prompt_modifier = self._prompt_modifier(conda_default_env)
 
@@ -341,8 +347,8 @@ def build_deactivate(self):
         }
 
     def build_reactivate(self):
-        conda_prefix = os.environ.get('CONDA_PREFIX')
-        conda_shlvl = int(os.environ.get('CONDA_SHLVL', -1))
+        conda_prefix = self.environ.get('CONDA_PREFIX')
+        conda_shlvl = int(self.environ.get('CONDA_SHLVL', -1))
         if not conda_prefix or conda_shlvl < 1:
             # no active environment, so cannot reactivate; do nothing
             return {
@@ -352,7 +358,7 @@ def build_reactivate(self):
                 'deactivate_scripts': (),
                 'activate_scripts': (),
             }
-        conda_default_env = os.environ.get('CONDA_DEFAULT_ENV', self._default_env(conda_prefix))
+        conda_default_env = self.environ.get('CONDA_DEFAULT_ENV', self._default_env(conda_prefix))
         # environment variables are set only to aid transition from conda 4.3 to conda 4.4
         return {
             'unset_vars': (),
@@ -366,7 +372,7 @@ def build_reactivate(self):
         }
 
     def _get_starting_path_list(self):
-        path = os.environ['PATH']
+        path = self.environ['PATH']
         if on_win:
             # On Windows, the Anaconda Python interpreter prepends sys.prefix\Library\bin on
             # startup. It's a hack that allows users to avoid using the correct activation
@@ -446,8 +452,8 @@ def _update_prompt(self, set_vars, conda_prompt_modifier):
             return
 
         if self.shell == 'posix':
-            ps1 = os.environ.get('PS1', '')
-            current_prompt_modifier = os.environ.get('CONDA_PROMPT_MODIFIER')
+            ps1 = self.environ.get('PS1', '')
+            current_prompt_modifier = self.environ.get('CONDA_PROMPT_MODIFIER')
             if current_prompt_modifier:
                 ps1 = re.sub(re.escape(current_prompt_modifier), r'', ps1)
             # Because we're using single-quotes to set shell variables, we need to handle the
@@ -458,8 +464,8 @@ def _update_prompt(self, set_vars, conda_prompt_modifier):
                 'PS1': conda_prompt_modifier + ps1,
             })
         elif self.shell == 'csh':
-            prompt = os.environ.get('prompt', '')
-            current_prompt_modifier = os.environ.get('CONDA_PROMPT_MODIFIER')
+            prompt = self.environ.get('prompt', '')
+            current_prompt_modifier = self.environ.get('CONDA_PROMPT_MODIFIER')
             if current_prompt_modifier:
                 prompt = re.sub(re.escape(current_prompt_modifier), r'', prompt)
             set_vars.update({
@@ -498,6 +504,13 @@ def ensure_binary(value):
         return value
 
 
+def ensure_fs_path_encoding(value):
+    try:
+        return value.decode(FILESYSTEM_ENCODING)
+    except AttributeError:
+        return value
+
+
 def native_path_to_unix(paths):  # pragma: unix no cover
     # on windows, uses cygpath to convert windows native paths to posix paths
     if not on_win:
@@ -532,6 +545,7 @@ def path_identity(paths):
 
 on_win = bool(sys.platform == "win32")
 PY2 = sys.version_info[0] == 2
+FILESYSTEM_ENCODING = sys.getfilesystemencoding()
 if PY2:  # pragma: py3 no cover
     string_types = basestring,  # NOQA
     text_type = unicode  # NOQA


Test patch:
diff --git a/tests/test_activate.py b/tests/test_activate.py
--- a/tests/test_activate.py
+++ b/tests/test_activate.py
@@ -471,6 +471,7 @@ def test_posix_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('posix')
             with captured() as c:
                 rc = activate_main(('', 'shell.posix', 'reactivate'))
             assert not c.stderr
@@ -549,6 +550,7 @@ def test_cmd_exe_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('cmd.exe')
             with captured() as c:
                 assert activate_main(('', 'shell.cmd.exe', 'reactivate')) == 0
             assert not c.stderr
@@ -626,6 +628,7 @@ def test_csh_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('csh')
             with captured() as c:
                 rc = activate_main(('', 'shell.csh', 'reactivate'))
             assert not c.stderr
@@ -701,6 +704,7 @@ def test_xonsh_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('xonsh')
             with captured() as c:
                 assert activate_main(('', 'shell.xonsh', 'reactivate')) == 0
             assert not c.stderr
@@ -776,6 +780,7 @@ def test_fish_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('fish')
             with captured() as c:
                 rc = activate_main(('', 'shell.fish', 'reactivate'))
             assert not c.stderr
@@ -845,6 +850,7 @@ def test_powershell_basic(self):
             'CONDA_SHLVL': '1',
             'PATH': os.pathsep.join(concatv(new_path_parts, (os.environ['PATH'],))),
         }):
+            activator = Activator('powershell')
             with captured() as c:
                 rc = activate_main(('', 'shell.powershell', 'reactivate'))
             assert not c.stderr