# Buggy code
def from_yaml(yamlstr, **kwargs):
    """Load and return a ``Environment`` from a given ``yaml string``"""
    data = yaml_load(yamlstr)
    if kwargs is not None:
        for key, value in kwargs.items():
            data[key] = value
    return Environment(**data)


# Traceback (ConstructorError)
Traceback (most recent call last):
File "[conda_dir]/lib/python2.7/site-packages/conda/exceptions.py", line 722, in __call__
return func(*args, **kwargs)
File "[conda_dir]/lib/python2.7/site-packages/conda_env/cli/main.py", line 74, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "[conda_dir]/lib/python2.7/site-packages/conda_env/cli/main_create.py", line 79, in execute
directory=os.getcwd())
File "[conda_dir]/lib/python2.7/site-packages/conda_env/specs/__init__.py", line 20, in detect
if spec.can_handle():
File "[conda_dir]/lib/python2.7/site-packages/conda_env/specs/yaml_file.py", line 14, in can_handle
self._environment = env.from_file(self.filename)
File "[conda_dir]/lib/python2.7/site-packages/conda_env/env.py", line 84, in from_file
return from_yaml(yamlstr, filename=filename)
File "[conda_dir]/lib/python2.7/site-packages/conda_env/env.py", line 72, in from_yaml
data = yaml_load(yamlstr)
File "[conda_dir]/lib/python2.7/site-packages/conda/common/serialize.py", line 54, in yaml_load
return yaml.load(string, Loader=yaml.RoundTripLoader, version="1.2")
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/main.py", line 75, in load
return loader.get_single_data()
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 62, in get_single_data
return self.construct_document(node)
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 71, in construct_document
for dummy in generator:
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 1049, in construct_yaml_map
self.construct_mapping(node, data)
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 978, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 120, in construct_object
data = next(generator)
File "[conda_dir]/lib/python2.7/site-packages/ruamel_yaml/constructor.py", line 1115, in construct_undefined
node.start_mark)
ConstructorError: could not determine a constructor for the tag '!!python/unicode'
in "<byte string>", line 191, column 9:
prefix: !!python/unicode '/home/pair/dev ...
^

environment variables:
CIO_TEST=<not set>
CONDA_ROOT=[conda_dir]
MODULEPATH=/etc/scl/modulefiles:/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/sh
are/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/pair/.local/bi
n:/home/pair/bin:/home/pair/.local/bin:/home/pair/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2
WINDOWPATH=2

active environment : None
user config file : /home/pair/.condarc
populated config files :
conda version : 4.4.2
conda-build version : not installed
python version : 2.7.14.final.0
base environment : [conda_dir]  (writable)
channel URLs : https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
package cache : [conda_dir]/pkgs
/home/pair/.conda/pkgs
envs directories : [conda_dir]/envs
/home/pair/.conda/envs
platform : linux-64
user-agent : conda/4.4.2 requests/2.18.4 CPython/2.7.14 Linux/4.13.16-100.fc25.x86_64 fedora/25 glibc/2.24
UID:GID : 1000:1000
netrc file : None
offline mode : False

# Fixed code
def from_yaml(yamlstr, **kwargs):
    """Load and return a ``Environment`` from a given ``yaml string``"""
    data = yaml_load_standard(yamlstr)
    if kwargs is not None:
        for key, value in kwargs.items():
            data[key] = value
    return Environment(**data)