after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from ..history import History
h = History(prefix)
if isfile(h.path):
if not context.json:
h.pr... | def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not context.json:
... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def execute(args, parser):
from ..core.linked_data import linked_data
from ..gateways.disk.delete import rm_rf
from ..instructions import PREFIX
from ..plan import (
add_unlink,
display_actions,
execute_actions,
is_root_prefix,
nothing_to_do,
remove_action... | def execute(args, parser):
import conda.plan as plan
import conda.instructions as inst
from conda.gateways.disk.delete import rm_rf
from conda.core.linked_data import linked_data
if not (args.all or args.package_names):
raise CondaValueError(
'no package names supplied,\n ... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def execute_search(args, parser):
import re
from ..resolve import Resolve
if args.reverse_dependency:
if not args.regex:
parser.error("--reverse-dependency requires at least one package name")
if args.spec:
parser.error("--reverse-dependency does not work with --spec... | def execute_search(args, parser):
import re
from conda.resolve import Resolve
if args.reverse_dependency:
if not args.regex:
parser.error("--reverse-dependency requires at least one package name")
if args.spec:
parser.error("--reverse-dependency does not work with --... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def get_local_urls():
from .models.channel import get_conda_build_local_url
return get_conda_build_local_url() or []
| def get_local_urls():
from conda.models.channel import get_conda_build_local_url
return get_conda_build_local_url() or []
| https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def add_binstar_token(url):
clean_url, token = split_anaconda_token(url)
if not token and context.add_anaconda_token:
for binstar_url, token in iteritems(read_binstar_tokens()):
if clean_url.startswith(binstar_url):
log.debug("Adding anaconda token for url <%s>", clean_url)
... | def add_binstar_token(url):
clean_url, token = split_anaconda_token(url)
if not token and context.add_anaconda_token:
for binstar_url, token in iteritems(read_binstar_tokens()):
if clean_url.startswith(binstar_url):
log.debug("Adding anaconda token for url <%s>", clean_url)
... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def print_conda_exception(exception):
from .base.context import context
stdoutlogger = getLogger("stdout")
stderrlogger = getLogger("stderr")
if context.json:
import json
stdoutlogger.info(
json.dumps(
exception.dump_map(), indent=2, sort_keys=True, cls=Enti... | def print_conda_exception(exception):
from conda.base.context import context
stdoutlogger = getLogger("stdout")
stderrlogger = getLogger("stderr")
if context.json:
import json
stdoutlogger.info(
json.dumps(
exception.dump_map(), indent=2, sort_keys=True, cls... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def print_unexpected_error_message(e):
# bomb = "\U0001F4A3 "
# explosion = "\U0001F4A5 "
# fire = "\U0001F525 "
# print("%s %s %s" % (3*bomb, 3*explosion, 3*fire))
traceback = format_exc()
stderrlogger = getLogger("stderr")
from .base.context import context
if context.json:
... | def print_unexpected_error_message(e):
# bomb = "\U0001F4A3 "
# explosion = "\U0001F4A5 "
# fire = "\U0001F525 "
# print("%s %s %s" % (3*bomb, 3*explosion, 3*fire))
traceback = format_exc()
stderrlogger = getLogger("stderr")
from conda.base.context import context
if context.json:
... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def handle_exception(e):
if isinstance(e, CondaExitZero):
return 0
elif isinstance(e, CondaError):
from .base.context import context
if context.debug or context.verbosity > 0:
print_unexpected_error_message(e)
else:
print_conda_exception(e)
return... | def handle_exception(e):
if isinstance(e, CondaExitZero):
return 0
elif isinstance(e, CondaError):
from conda.base.context import context
if context.debug or context.verbosity > 0:
print_unexpected_error_message(e)
else:
print_conda_exception(e)
r... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def win_conda_bat_redirect(src, dst, shell):
"""Special function for Windows XP where the `CreateSymbolicLink`
function is not available.
Simply creates a `.bat` file at `dst` which calls `src` together with
all command line arguments.
Works of course only with callable files, e.g. `.bat` or `.exe... | def win_conda_bat_redirect(src, dst, shell):
"""Special function for Windows XP where the `CreateSymbolicLink`
function is not available.
Simply creates a `.bat` file at `dst` which calls `src` together with
all command line arguments.
Works of course only with callable files, e.g. `.bat` or `.exe... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def execute(args, parser):
from ..base.context import context
if args.root:
if context.json:
stdout_json({"root_prefix": context.root_prefix})
else:
print(context.root_prefix)
return
if args.packages:
print_package_info(args.packages)
return
... | def execute(args, parser):
from ..base.context import context
if args.root:
if context.json:
stdout_json({"root_prefix": context.root_prefix})
else:
print(context.root_prefix)
return
if args.packages:
print_package_info(args.packages)
return
... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def print_unexpected_error_message(e):
# bomb = "\U0001F4A3 "
# explosion = "\U0001F4A5 "
# fire = "\U0001F525 "
# print("%s %s %s" % (3*bomb, 3*explosion, 3*fire))
traceback = format_exc()
stderrlogger = getLogger("stderr")
from .base.context import context
if context.json:
... | def print_unexpected_error_message(e):
# bomb = "\U0001F4A3 "
# explosion = "\U0001F4A5 "
# fire = "\U0001F525 "
# print("%s %s %s" % (3*bomb, 3*explosion, 3*fire))
traceback = format_exc()
stderrlogger = getLogger("stderr")
from .base.context import context
if context.json:
... | https://github.com/conda/conda/issues/5039 | $ conda -h
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/vmrguser/anaconda2/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/home/vmrguser... | ImportError |
def clone(src_arg, dst_prefix, json=False, quiet=False, index_args=None):
if os.sep in src_arg:
src_prefix = abspath(src_arg)
if not isdir(src_prefix):
raise DirectoryNotFoundError(src_arg)
else:
src_prefix = context.clone_src
if not json:
print("Source: %s"... | def clone(src_arg, dst_prefix, json=False, quiet=False, index_args=None):
if os.sep in src_arg:
src_prefix = abspath(src_arg)
if not isdir(src_prefix):
raise DirectoryNotFoundError(
src_arg, "no such directory: %s" % src_arg, json
)
else:
src_prefi... | https://github.com/conda/conda/issues/4969 | Traceback (most recent call last):
File "/conda/lib/python3.6/site-packages/conda/exceptions.py", line 591, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/conda/lib/python3.6/site-packages/conda/cli/main.py", line 134, in _main
exit_code = args.func(args, p)
File "/conda/lib/python3.6/site-packa... | TypeError |
def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_configuration()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_pre... | def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_configuration()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_pre... | https://github.com/conda/conda/issues/4998 | `$ F:\miniconda3_4.3.16_x64\Scripts\conda-script.py install foobar`
Traceback (most recent call last):
File "F:\miniconda3_4.3.16_x64\lib\site-packages\conda\cli\install.py", line 251, in install
channel_priority_map=_channel_priority_map, is_update=isupdate)
File "F:\miniconda3_4.3.16_x64\lib\site-packages\conda\pla... | conda.exceptions.NoPackagesFoundError |
def signal_handler(handler):
_thread_local = threading.local()
_thread_local.previous_handlers = []
for signame in INTERRUPT_SIGNALS:
sig = getattr(signal, signame, None)
if sig:
log.debug("registering handler for %s", signame)
try:
prev_handler = sign... | def signal_handler(handler):
previous_handlers = []
for signame in INTERRUPT_SIGNALS:
sig = getattr(signal, signame, None)
if sig:
log.debug("registering handler for %s", signame)
prev_handler = signal.signal(sig, handler)
previous_handlers.append((sig, prev_h... | https://github.com/conda/conda/issues/5132 | Traceback (most recent call last):
File "/home/travis/build/conda/conda/conda-build/conda_build/build.py", line 688, in create_env
execute_actions(actions, index, verbose=config.debug)
File "/home/travis/build/conda/conda/conda/plan.py", line 612, in execute_actions
execute_instructions(plan, index, verbose)
File "/hom... | ValueError |
def install_actions_list(
prefix,
index,
specs,
force=False,
only_names=None,
always_copy=False,
pinned=True,
minimal_hint=False,
update_deps=True,
prune=False,
channel_priority_map=None,
is_update=False,
):
# type: (str, Dict[Dist, Record], List[str], bool, Option[Li... | def install_actions_list(
prefix,
index,
specs,
force=False,
only_names=None,
always_copy=False,
pinned=True,
minimal_hint=False,
update_deps=True,
prune=False,
channel_priority_map=None,
is_update=False,
):
# type: (str, Dict[Dist, Record], List[str], bool, Option[Li... | https://github.com/conda/conda/issues/4849 | $ conda info -a
Current conda install:
platform : linux-64
conda version : 4.3.13
conda is private : False
conda-env version : 4.3.13
conda-build version : 2.0.2
python version : 2.7.12.final.0
requests version : 2.13.0
root environment : /home/hp/bin/anaconda2 (writable)
default environment : /home/hp/bin/anaconda2/... | KeyError |
def match_to_original_specs(specs, specs_for_prefix):
matches_any_spec = lambda dst: next(spc for spc in specs if spc.name == dst)
matched_specs_for_prefix = []
for prefix_with_dists in specs_for_prefix:
linked = linked_data(prefix_with_dists.prefix)
r = prefix_with_dists.r
new_match... | def match_to_original_specs(str_specs, specs_for_prefix):
matches_any_spec = lambda dst: next(spc for spc in str_specs if spc.startswith(dst))
matched_specs_for_prefix = []
for prefix_with_dists in specs_for_prefix:
linked = linked_data(prefix_with_dists.prefix)
r = prefix_with_dists.r
... | https://github.com/conda/conda/issues/4849 | $ conda info -a
Current conda install:
platform : linux-64
conda version : 4.3.13
conda is private : False
conda-env version : 4.3.13
conda-build version : 2.0.2
python version : 2.7.12.final.0
requests version : 2.13.0
root environment : /home/hp/bin/anaconda2 (writable)
default environment : /home/hp/bin/anaconda2/... | KeyError |
def get_actions_for_dists(
specs_by_prefix, only_names, index, force, always_copy, prune, update_deps, pinned
):
root_only = ("conda", "conda-env")
prefix = specs_by_prefix.prefix
r = specs_by_prefix.r
specs = [MatchSpec(s) for s in specs_by_prefix.specs]
specs = augment_specs(prefix, specs, pin... | def get_actions_for_dists(
dists_for_prefix, only_names, index, force, always_copy, prune, update_deps, pinned
):
root_only = ("conda", "conda-env")
prefix = dists_for_prefix.prefix
dists = dists_for_prefix.specs
r = dists_for_prefix.r
specs = [MatchSpec(dist) for dist in dists]
specs = augm... | https://github.com/conda/conda/issues/4849 | $ conda info -a
Current conda install:
platform : linux-64
conda version : 4.3.13
conda is private : False
conda-env version : 4.3.13
conda-build version : 2.0.2
python version : 2.7.12.final.0
requests version : 2.13.0
root environment : /home/hp/bin/anaconda2 (writable)
default environment : /home/hp/bin/anaconda2/... | KeyError |
def __call__(self, *args, **kw):
newargs = []
for arg in args:
if isinstance(arg, list):
newargs.append(tuple(arg))
elif not isinstance(arg, Hashable):
# uncacheable. a list, for instance.
# better to not cache than blow up.
return self.func(*args,... | def __call__(self, *args, **kw):
newargs = []
for arg in args:
if isinstance(arg, list):
newargs.append(tuple(arg))
elif not isinstance(arg, collections.Hashable):
# uncacheable. a list, for instance.
# better to not cache than blow up.
return self... | https://github.com/conda/conda/issues/5022 | $ conda install pandas
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/simmi/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 591, in conda_... | ImportError |
def configure_parser(sub_parsers):
from .common import (
add_parser_help,
add_parser_json,
add_parser_prefix,
add_parser_show_channel_urls,
)
p = sub_parsers.add_parser(
"list",
description=descr,
help=descr,
formatter_class=RawDescriptionHelp... | def configure_parser(sub_parsers):
p = sub_parsers.add_parser(
"list",
description=descr,
help=descr,
formatter_class=RawDescriptionHelpFormatter,
epilog=examples,
add_help=False,
)
add_parser_help(p)
add_parser_prefix(p)
add_parser_json(p)
add_par... | https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def print_export_header(subdir):
print("# This file may be used to create an environment using:")
print("# $ conda create --name <env> --file <this file>")
print("# platform: %s" % subdir)
| def print_export_header():
print("# This file may be used to create an environment using:")
print("# $ conda create --name <env> --file <this file>")
print("# platform: %s" % context.subdir)
| https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def list_packages(
prefix, installed, regex=None, format="human", show_channel_urls=None
):
from .common import disp_features
from ..base.constants import DEFAULTS_CHANNEL_NAME
from ..base.context import context
from ..core.linked_data import is_linked
res = 0
result = []
for dist in ge... | def list_packages(
prefix,
installed,
regex=None,
format="human",
show_channel_urls=context.show_channel_urls,
):
res = 0
result = []
for dist in get_packages(installed, regex):
if format == "canonical":
result.append(dist)
continue
if format == "e... | https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def print_packages(
prefix,
regex=None,
format="human",
piplist=False,
json=False,
show_channel_urls=None,
):
from .common import stdout_json
from ..base.context import context
from ..common.compat import text_type
from ..core.linked_data import linked
from ..egg_info import ... | def print_packages(
prefix,
regex=None,
format="human",
piplist=False,
json=False,
show_channel_urls=context.show_channel_urls,
):
if not isdir(prefix):
raise CondaEnvironmentNotFoundError(prefix)
if not json:
if format == "human":
print("# packages in enviro... | https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def print_explicit(prefix, add_md5=False):
from ..base.constants import UNKNOWN_CHANNEL
from ..base.context import context
from ..core.linked_data import linked_data
if not isdir(prefix):
from ..exceptions import CondaEnvironmentNotFoundError
raise CondaEnvironmentNotFoundError(prefix)... | def print_explicit(prefix, add_md5=False):
if not isdir(prefix):
raise CondaEnvironmentNotFoundError(prefix)
print_export_header()
print("@EXPLICIT")
for meta in sorted(linked_data(prefix).values(), key=lambda x: x["name"]):
url = meta.get("url")
if not url or url.startswith(UNKN... | https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def execute(args, parser):
from ..base.context import context
from .common import stdout_json
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from ..history import History
h = History(prefix)
... | def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from ..history import History
h = History(prefix)
if isfile(h.path):
if not context.json:
h.pr... | https://github.com/conda/conda/issues/5028 | Traceback (most recent call last):
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/tasalta/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(... | ImportError |
def _init_packages_map(self):
if self.__packages_map is not None:
return self.__packages_map
self.__packages_map = __packages_map = {}
pkgs_dir = self.pkgs_dir
if not isdir(pkgs_dir):
return __packages_map
def _add_entry(__packages_map, pkgs_dir, package_filename):
if not pa... | def _init_packages_map(self):
if self.__packages_map is not None:
return self.__packages_map
self.__packages_map = __packages_map = {}
pkgs_dir = self.pkgs_dir
if not isdir(pkgs_dir):
return __packages_map
def _add_entry(__packages_map, pkgs_dir, package_filename):
if not pa... | https://github.com/conda/conda/issues/4840 | $ conda install conda=4.3.13
Fetching package metadata .........
Solving package specifications: .
Package plan for installation in environment /localdisk/work/tmtomash/miniconda3:
The following packages will be DOWNGRADED due to dependency conflicts:
conda: 4.3.14-py35_0 --> 4.3.13-py35_0
Proceed ([y]/n)? y
An un... | TypeError |
def dedupe_pkgs_dir_contents(pkgs_dir_contents):
# if both 'six-1.10.0-py35_0/' and 'six-1.10.0-py35_0.tar.bz2' are in pkgs_dir,
# only 'six-1.10.0-py35_0.tar.bz2' will be in the return contents
if not pkgs_dir_contents:
return []
contents = []
def _process(x, y):
if x + CONDA_TA... | def dedupe_pkgs_dir_contents(pkgs_dir_contents):
# if both 'six-1.10.0-py35_0/' and 'six-1.10.0-py35_0.tar.bz2' are in pkgs_dir,
# only 'six-1.10.0-py35_0.tar.bz2' will be in the return contents
contents = []
def _process(x, y):
if x + CONDA_TARBALL_EXTENSION != y:
contents.append... | https://github.com/conda/conda/issues/4840 | $ conda install conda=4.3.13
Fetching package metadata .........
Solving package specifications: .
Package plan for installation in environment /localdisk/work/tmtomash/miniconda3:
The following packages will be DOWNGRADED due to dependency conflicts:
conda: 4.3.14-py35_0 --> 4.3.13-py35_0
Proceed ([y]/n)? y
An un... | TypeError |
def error(self, message):
import re
import subprocess
from .find_commands import find_executable
exc = sys.exc_info()[1]
if exc:
# this is incredibly lame, but argparse stupidly does not expose
# reasonable hooks for customizing error handling
if hasattr(exc, "argument_name"... | def error(self, message):
import re
import subprocess
from .find_commands import find_executable
exc = sys.exc_info()[1]
if exc:
# this is incredibly lame, but argparse stupidly does not expose
# reasonable hooks for customizing error handling
if hasattr(exc, "argument_name"... | https://github.com/conda/conda/issues/4944 | (root) [root@d4cb01a1b5b6 ~]# conda activate
Traceback (most recent call last):
File "/conda/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/conda/lib/python2.7/site-packages/conda/cli/main.py", line 161, in main
raise CommandNotFoundError(argv1, message)
TypeError: __init__() takes exactly 2 argument... | TypeError |
def main(*args):
if not args:
args = sys.argv
if not args:
args = sys.argv
log.debug("conda.cli.main called with %s", args)
if len(args) > 1:
try:
argv1 = args[1].strip()
if argv1.startswith(".."):
import conda.cli.activate as activate
... | def main(*args):
if not args:
args = sys.argv
if not args:
args = sys.argv
log.debug("conda.cli.main called with %s", args)
if len(args) > 1:
try:
argv1 = args[1].strip()
if argv1.startswith(".."):
import conda.cli.activate as activate
... | https://github.com/conda/conda/issues/4944 | (root) [root@d4cb01a1b5b6 ~]# conda activate
Traceback (most recent call last):
File "/conda/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/conda/lib/python2.7/site-packages/conda/cli/main.py", line 161, in main
raise CommandNotFoundError(argv1, message)
TypeError: __init__() takes exactly 2 argument... | TypeError |
def __init__(self, command):
build_commands = {
"build",
"convert",
"develop",
"index",
"inspect",
"metapackage",
"render",
"skeleton",
}
needs_source = {"activate", "deactivate"}
if command in build_commands:
message = dals("""
... | def __init__(self, command):
message = "Conda could not find the command: '%(command)s'"
super(CommandNotFoundError, self).__init__(message, command=command)
| https://github.com/conda/conda/issues/4944 | (root) [root@d4cb01a1b5b6 ~]# conda activate
Traceback (most recent call last):
File "/conda/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/conda/lib/python2.7/site-packages/conda/cli/main.py", line 161, in main
raise CommandNotFoundError(argv1, message)
TypeError: __init__() takes exactly 2 argument... | TypeError |
def read_mod_and_etag(path):
with open(path, "rb") as f:
try:
with closing(mmap(f.fileno(), 0, access=ACCESS_READ)) as m:
match_objects = take(3, re.finditer(REPODATA_HEADER_RE, m))
result = dict(map(ensure_unicode, mo.groups()) for mo in match_objects)
... | def read_mod_and_etag(path):
with open(path, "rb") as f:
try:
with closing(mmap(f.fileno(), 0, access=ACCESS_READ)) as m:
match_objects = take(3, re.finditer(REPODATA_HEADER_RE, m))
result = dict(map(ensure_unicode, mo.groups()) for mo in match_objects)
... | https://github.com/conda/conda/issues/4592 | PS C:\> conda update conda
Fetching package metadata ...An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.3.7
conda is private : False
conda-env v... | BufferError |
def execute(self):
# I hate inline imports, but I guess it's ok since we're importing from the conda.core
# The alternative is passing the the classes to ExtractPackageAction __init__
from .package_cache import PackageCache, PackageCacheEntry
log.trace("extracting %s => %s", self.source_full_path, self... | def execute(self):
# I hate inline imports, but I guess it's ok since we're importing from the conda.core
# The alternative is passing the the classes to ExtractPackageAction __init__
from .package_cache import PackageCache, PackageCacheEntry
log.trace("extracting %s => %s", self.source_full_path, self... | https://github.com/conda/conda/issues/4309 | Traceback (most recent call last):
File "/root/miniconda3/lib/python3.5/site-packages/conda/exceptions.py", line 617, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/root/miniconda3/lib/python3.5/site-packages/conda_env/cli/main_create.py", line 112, in execute
installer.install(prefix, pkg_specs... | conda.CondaMultiError |
def box(self, instance, val):
if isinstance(val, string_types):
val = val.replace("-", "").replace("_", "").lower()
if val == "hard":
val = LinkType.hardlink
elif val == "soft":
val = LinkType.softlink
return super(LinkTypeField, self).box(instance, val)
| def box(self, instance, val):
if isinstance(val, string_types):
val = val.replace("-", "").replace("_", "").lower()
return super(LinkTypeField, self).box(instance, val)
| https://github.com/conda/conda/issues/4398 | An unexpected error has occurred.
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.6
conda is private : False
conda-env version : 4.3.6
conda-build version : 1.21.5
python versi... | ValidationError |
def remove_actions(prefix, specs, index, force=False, pinned=True):
r = Resolve(index)
linked = linked_data(prefix)
linked_dists = [d for d in linked.keys()]
if force:
mss = list(map(MatchSpec, specs))
nlinked = {
r.package_name(dist): dist
for dist in linked_dis... | def remove_actions(prefix, specs, index, force=False, pinned=True):
r = Resolve(index)
linked = linked_data(prefix)
linked_dists = [d for d in linked.keys()]
if force:
mss = list(map(MatchSpec, specs))
nlinked = {
r.package_name(dist): dist
for dist in linked_dis... | https://github.com/conda/conda/issues/4324 | Current conda install:
platform : linux-64
conda version : 4.3.4
conda is private : False
conda-env version : 4.3.4
conda-build version : not installed
python version : 2.7.13.final.0
requests version : 2.12.4
root environment : /home/travis/miniconda (writable)
default environment : /home/travis/miniconda/en... | KeyError |
def is_url(url):
if not url:
return False
try:
p = urlparse(url)
return p.netloc is not None or p.scheme == "file"
except LocationParseError:
log.debug("Could not parse url ({0}).".format(url))
return False
| def is_url(url):
try:
p = urlparse(url)
return p.netloc is not None or p.scheme == "file"
except LocationParseError:
log.debug("Could not parse url ({0}).".format(url))
return False
| https://github.com/conda/conda/issues/3910 | An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.2.12
conda is private : False
conda-env version : 4.2.12
conda-build version : 2.0.7
python vers... | AttributeError |
def _read_channel_configuration(scheme, host, port, path):
# return location, name, scheme, auth, token
path = path and path.rstrip("/")
test_url = Url(host=host, port=port, path=path).url
# Step 1. No path given; channel name is None
if not path:
return (
Url(host=host, port=p... | def _read_channel_configuration(scheme, host, port, path):
# return location, name, scheme, auth, token
test_url = Url(host=host, port=port, path=path).url.rstrip("/")
# Step 1. migrated_custom_channels matches
for name, location in sorted(
context.migrated_custom_channels.items(), reverse=Tru... | https://github.com/conda/conda/issues/3717 | Traceback (most recent call last):
File "C:\Miniconda3\lib\site-packages\conda\exceptions.py", line 479, in c
onda_exception_handler
return_value = func(*args, **kwargs)
File "C:\Miniconda3\lib\site-packages\conda\cli\main.py", line 145, in _ma
in
exit_code = args.func(args, p)
File "C:\Miniconda3\lib\site-packages\con... | AttributeError |
def canonical_name(self):
for multiname, channels in iteritems(context.custom_multichannels):
for channel in channels:
if self.name == channel.name:
return multiname
for that_name in context.custom_channels:
if self.name and tokenized_startswith(
self.nam... | def canonical_name(self):
for multiname, channels in iteritems(context.custom_multichannels):
for channel in channels:
if self.name == channel.name:
return multiname
for that_name in context.custom_channels:
if tokenized_startswith(self.name.split("/"), that_name.spl... | https://github.com/conda/conda/issues/3717 | Traceback (most recent call last):
File "C:\Miniconda3\lib\site-packages\conda\exceptions.py", line 479, in c
onda_exception_handler
return_value = func(*args, **kwargs)
File "C:\Miniconda3\lib\site-packages\conda\cli\main.py", line 145, in _ma
in
exit_code = args.func(args, p)
File "C:\Miniconda3\lib\site-packages\con... | AttributeError |
def replace_long_shebang(mode, data):
if mode == FileMode.text:
shebang_match = SHEBANG_REGEX.match(data)
if shebang_match:
whole_shebang, executable, options = shebang_match.groups()
if len(whole_shebang) > 127:
executable_name = executable.decode(UTF8).split... | def replace_long_shebang(mode, data):
if mode is FileMode.text:
shebang_match = SHEBANG_REGEX.match(data)
if shebang_match:
whole_shebang, executable, options = shebang_match.groups()
if len(whole_shebang) > 127:
executable_name = executable.decode(UTF8).split... | https://github.com/conda/conda/issues/3646 | Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/cli/main.py", l... | CondaRuntimeError |
def replace_prefix(mode, data, placeholder, new_prefix):
if mode == FileMode.text:
data = data.replace(placeholder.encode(UTF8), new_prefix.encode(UTF8))
elif mode == FileMode.binary:
data = binary_replace(data, placeholder.encode(UTF8), new_prefix.encode(UTF8))
else:
raise RuntimeEr... | def replace_prefix(mode, data, placeholder, new_prefix):
if mode is FileMode.text:
data = data.replace(placeholder.encode(UTF8), new_prefix.encode(UTF8))
elif mode == FileMode.binary:
data = binary_replace(data, placeholder.encode(UTF8), new_prefix.encode(UTF8))
else:
raise RuntimeEr... | https://github.com/conda/conda/issues/3646 | Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/cli/main.py", l... | CondaRuntimeError |
def update_prefix(path, new_prefix, placeholder=PREFIX_PLACEHOLDER, mode=FileMode.text):
if on_win and mode == FileMode.text:
# force all prefix replacements to forward slashes to simplify need to escape backslashes
# replace with unix-style path separators
new_prefix = new_prefix.replace("\... | def update_prefix(path, new_prefix, placeholder=PREFIX_PLACEHOLDER, mode=FileMode.text):
if on_win and mode is FileMode.text:
# force all prefix replacements to forward slashes to simplify need to escape backslashes
# replace with unix-style path separators
new_prefix = new_prefix.replace("\... | https://github.com/conda/conda/issues/3646 | Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/conda/cli/main.py", l... | CondaRuntimeError |
def from_value(value):
if value is None:
return Channel(name="<unknown>")
if hasattr(value, "decode"):
value = value.decode(UTF8)
if has_scheme(value):
if value.startswith("file:") and on_win:
value = value.replace("\\", "/")
return Channel.from_url(value)
eli... | def from_value(value):
if value is None:
return Channel(name="<unknown>")
elif has_scheme(value):
if value.startswith("file:") and on_win:
value = value.replace("\\", "/")
return Channel.from_url(value)
elif value.startswith(("./", "..", "~", "/")) or is_windows_path(valu... | https://github.com/conda/conda/issues/3655 | Traceback (most recent call last):
File "/usr1/eclark/anaconda3/lib/python3.4/site-packages/conda/exceptions.py", line 473, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/usr1/eclark/anaconda3/lib/python3.4/site-packages/conda/cli/main.py", line 144, in _main
exit_code = args.func(args, p)
File ... | TypeError |
def _main():
from ..base.context import context
from ..gateways.logging import set_all_logger_level, set_verbosity
from ..exceptions import CommandNotFoundError
from ..utils import on_win
log.debug("conda.cli.main called with %s", sys.argv)
if len(sys.argv) > 1:
argv1 = sys.argv[1]
... | def _main():
log.debug("conda.cli.main called with %s", sys.argv)
if len(sys.argv) > 1:
argv1 = sys.argv[1]
if argv1 in ("..activate", "..deactivate", "..checkenv", "..changeps1"):
import conda.cli.activate as activate
activate.main()
return
if argv1 ... | https://github.com/conda/conda/issues/3590 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda", line 4, in <module>
import conda.cli
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/__init__.py", line 8, in <module>
from .main import main # NOQA
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 46, in <module>
from... | ruamel_yaml.scanner.ScannerError |
def main():
from ..exceptions import conda_exception_handler
return conda_exception_handler(_main)
| def main():
return conda_exception_handler(_main)
| https://github.com/conda/conda/issues/3590 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda", line 4, in <module>
import conda.cli
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/__init__.py", line 8, in <module>
from .main import main # NOQA
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 46, in <module>
from... | ruamel_yaml.scanner.ScannerError |
def make_raw_parameters_from_file(cls, filepath):
with open(filepath, "r") as fh:
try:
ruamel_yaml = yaml_load(fh)
except ScannerError as err:
mark = err.problem_mark
raise LoadError("Invalid YAML", filepath, mark.line, mark.column)
return cls.make_raw_paramet... | def make_raw_parameters_from_file(cls, filepath):
with open(filepath, "r") as fh:
ruamel_yaml = yaml_load(fh)
return cls.make_raw_parameters(filepath, ruamel_yaml) or EMPTY_MAP
| https://github.com/conda/conda/issues/3590 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda", line 4, in <module>
import conda.cli
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/__init__.py", line 8, in <module>
from .main import main # NOQA
File "/opt/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 46, in <module>
from... | ruamel_yaml.scanner.ScannerError |
def collect_errors(self, instance, value, source="<<merged>>"):
errors = super(MapParameter, self).collect_errors(instance, value)
if isinstance(value, Mapping):
element_type = self._element_type
errors.extend(
InvalidElementTypeError(
self.name, val, source, type(val... | def collect_errors(self, instance, value, source="<<merged>>"):
errors = super(MapParameter, self).collect_errors(instance, value)
element_type = self._element_type
errors.extend(
InvalidElementTypeError(self.name, val, source, type(val), element_type, key)
for key, val in iteritems(value)
... | https://github.com/conda/conda/issues/3467 | Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\conda\exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\conda\cli\main.py", line 144, in _main
exit_code = args.func(args, p)
File "C:\Anaconda3\lib\site-packages\conda\cl... | AttributeError |
def check_prefix(prefix, json=False):
name = basename(prefix)
error = None
if name.startswith("."):
error = "environment name cannot start with '.': %s" % name
if name == ROOT_ENV_NAME:
error = "'%s' is a reserved environment name" % name
if exists(prefix):
if isdir(prefix) a... | def check_prefix(prefix, json=False):
name = basename(prefix)
error = None
if name.startswith("."):
error = "environment name cannot start with '.': %s" % name
if name == ROOT_ENV_NAME:
error = "'%s' is a reserved environment name" % name
if exists(prefix):
if isdir(prefix) a... | https://github.com/conda/conda/issues/3453 | Traceback (most recent call last):
File "/opt/a/b/c/muunitnoc/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/opt/a/b/c/muunitnoc/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 144, in _main
exit_code = args.func(... | AttributeError |
def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_all()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_prefix(args, ... | def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_all()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_prefix(args, ... | https://github.com/conda/conda/issues/3453 | Traceback (most recent call last):
File "/opt/a/b/c/muunitnoc/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/opt/a/b/c/muunitnoc/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 144, in _main
exit_code = args.func(... | AttributeError |
def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_all()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_prefix(args, ... | def install(args, parser, command="install"):
"""
conda install, conda update, and conda create
"""
context.validate_all()
newenv = bool(command == "create")
isupdate = bool(command == "update")
isinstall = bool(command == "install")
if newenv:
common.ensure_name_or_prefix(args, ... | https://github.com/conda/conda/issues/3409 | Traceback (most recent call last):
File "/reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/lib/python2.7/site-packages/conda/exceptions.py", line 471, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/lib/python2.7/site-packages/conda/cli/main.py", line 14... | TypeError |
def explicit(
specs, prefix, verbose=False, force_extract=True, fetch_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = RM_FETCHED, FETCH, RM_EXTRACTED, EXTRACT, UNLINK, LINK
linked = {name_dist(dist): dist for dist in install_linked(prefix)}
f... | def explicit(
specs, prefix, verbose=False, force_extract=True, fetch_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = RM_FETCHED, FETCH, RM_EXTRACTED, EXTRACT, UNLINK, LINK
linked = {name_dist(dist): dist for dist in install_linked(prefix)}
f... | https://github.com/conda/conda/issues/2633 | [root@hostname ~]# /opt/wakari/anaconda/bin/conda create -p ~/new-env --clone /opt/wakari/anaconda/
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
src_prefix: '/opt/wakari/anaconda'
dst_prefix: '/root/new-env'
Packages: 313
Files: 47057
An unexpected error has occurred, please ... | KeyError |
def clone_env(prefix1, prefix2, verbose=True, quiet=False, fetch_args=None):
"""
clone existing prefix1 into new prefix2
"""
untracked_files = untracked(prefix1)
# Discard conda and any package that depends on it
drecs = linked_data(prefix1)
filter = {}
found = True
while found:
... | def clone_env(prefix1, prefix2, verbose=True, quiet=False, fetch_args=None):
"""
clone existing prefix1 into new prefix2
"""
untracked_files = untracked(prefix1)
# Discard conda and any package that depends on it
drecs = linked_data(prefix1)
filter = {}
found = True
while found:
... | https://github.com/conda/conda/issues/2633 | [root@hostname ~]# /opt/wakari/anaconda/bin/conda create -p ~/new-env --clone /opt/wakari/anaconda/
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
src_prefix: '/opt/wakari/anaconda'
dst_prefix: '/root/new-env'
Packages: 313
Files: 47057
An unexpected error has occurred, please ... | KeyError |
def environment(self):
dependencies = []
with open(self.filename) as reqfile:
for line in reqfile:
line = line.strip()
if not line or line.startswith("#"):
continue
dependencies.append(line)
return env.Environment(name=self.name, dependencies=depen... | def environment(self):
dependencies = []
with open(self.filename) as reqfile:
for line in reqfile:
dependencies.append(line)
return env.Environment(name=self.name, dependencies=dependencies)
| https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def execute(args, parser):
if not args.name:
# Note, this is a hack fofr get_prefix that assumes argparse results
# TODO Refactor common.get_prefix
name = os.environ.get("CONDA_DEFAULT_ENV", False)
if not name:
msg = "Unable to determine environment\n\n"
msg +... | def execute(args, parser):
if not args.name:
# Note, this is a hack fofr get_prefix that assumes argparse results
# TODO Refactor common.get_prefix
name = os.environ.get("CONDA_DEFAULT_ENV", False)
if not name:
msg = "Unable to determine environment\n\n"
msg +... | https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def from_environment(name, prefix, no_builds=False, ignore_channels=False):
"""
Get environment object from prefix
Args:
name: The name of environment
prefix: The path of prefix
no_builds: Whether has build requirement
ignore_channels: whether ingore_channels
Returns... | def from_environment(name, prefix, no_builds=False, ignore_channels=False):
installed = install.linked(prefix, ignore_channels=ignore_channels)
conda_pkgs = copy(installed)
# json=True hides the output, data is added to installed
add_pip_installed(prefix, installed, json=True)
pip_pkgs = sorted(ins... | https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def install(prefix, specs, args, env, prune=False):
# TODO: support all various ways this happens
# Including 'nodefaults' in the channels list disables the defaults
new_specs = []
channel_urls = set()
for elem in specs:
if "::" in elem:
channel_urls.add(elem.split("::")[0])
... | def install(prefix, specs, args, env, prune=False):
# TODO: support all various ways this happens
# Including 'nodefaults' in the channels list disables the defaults
index = get_index(
channel_urls=[chan for chan in env.channels if chan != "nodefaults"],
prepend="nodefaults" not in env.chann... | https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def add_pip_installed(prefix, installed_pkgs, json=None, output=True):
# Defer to json for backwards compatibility
if type(json) is bool:
output = not json
# TODO Refactor so installed is a real list of objects/dicts
# instead of strings allowing for direct comparison
# split :: to get... | def add_pip_installed(prefix, installed_pkgs, json=None, output=True):
# Defer to json for backwards compatibility
if type(json) is bool:
output = not json
# TODO Refactor so installed is a real list of objects/dicts
# instead of strings allowing for direct comparison
conda_names = {d.... | https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not args.json:
h.... | def execute(args, parser):
prefix = context.prefix_w_legacy_search
regex = args.regex
if args.full_name:
regex = r"^%s$" % regex
if args.revisions:
from conda.history import History
h = History(prefix)
if isfile(h.path):
if not args.json:
h.... | https://github.com/conda/conda/issues/3253 | n unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.2.1
conda is private : False
conda-env version : 2.5.2
conda-build version : 1.21.11+0.g5b44ab3.... | AttributeError |
def explicit(
specs, prefix, verbose=False, force_extract=True, index_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = (
RM_FETCHED,
FETCH,
RM_EXTRACTED,
EXTRACT,
UNLINK,
LINK,
SYMLINK_CONDA,
... | def explicit(
specs, prefix, verbose=False, force_extract=True, index_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = (
RM_FETCHED,
FETCH,
RM_EXTRACTED,
EXTRACT,
UNLINK,
LINK,
SYMLINK_CONDA,
... | https://github.com/conda/conda/issues/3060 | Traceback (most recent call last):
File "/opt/miniconda/bin/conda", line 6, in <module>
sys.exit(main())
File "/opt/miniconda/lib/python2.7/site-packages/conda/cli/main.py", line 120, in main
exit_code = args_func(args, p)
File "/opt/miniconda/lib/python2.7/site-packages/conda/cli/main.py", line 130, in args_func
exit_... | AttributeError |
def explicit(
specs, prefix, verbose=False, force_extract=True, index_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = (
RM_FETCHED,
FETCH,
RM_EXTRACTED,
EXTRACT,
UNLINK,
LINK,
SYMLINK_CONDA,
... | def explicit(
specs, prefix, verbose=False, force_extract=True, index_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = (
RM_FETCHED,
FETCH,
RM_EXTRACTED,
EXTRACT,
UNLINK,
LINK,
SYMLINK_CONDA,
... | https://github.com/conda/conda/issues/2970 | 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 "/home/user/miniconda2/bin/conda", line 6, in <module>
... | KeyError |
def __init__(self, path):
self.path = path
self.end = "-" + str(os.getpid())
self.lock_path = join(self.path, LOCKFN + self.end)
self.pattern = join(self.path, LOCKFN + "-*")
self.remove = True
| def __init__(self, path, retries=10):
self.path = path
self.end = "-" + str(os.getpid())
self.lock_path = os.path.join(self.path, LOCKFN + self.end)
self.retries = retries
| https://github.com/conda/conda/issues/2778 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda-env", line 6, in <module>
sys.exit(conda_env.cli.main.main())
File "/opt/anaconda/lib/python3.5/site-packages/conda_env/cli/main.py", line 68, in main
return args_func(args, parser)
File "/opt/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line ... | PermissionError |
def __enter__(self):
retries = 10
# Keep the string "LOCKERROR" in this string so that external
# programs can look for it.
lockstr = """\
LOCKERROR: It looks like conda is already doing something.
The lock %s was found. Wait for it to finish before continuing.
If you are sure that conda is ... | def __enter__(self):
# Keep the string "LOCKERROR" in this string so that external
# programs can look for it.
lockstr = """\
LOCKERROR: It looks like conda is already doing something.
The lock %s was found. Wait for it to finish before continuing.
If you are sure that conda is not running, remo... | https://github.com/conda/conda/issues/2778 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda-env", line 6, in <module>
sys.exit(conda_env.cli.main.main())
File "/opt/anaconda/lib/python3.5/site-packages/conda_env/cli/main.py", line 68, in main
return args_func(args, parser)
File "/opt/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line ... | PermissionError |
def __exit__(self, exc_type, exc_value, traceback):
if self.remove:
for path in self.lock_path, self.path:
try:
os.rmdir(path)
except OSError:
pass
| def __exit__(self, exc_type, exc_value, traceback):
try:
os.rmdir(self.lock_path)
os.rmdir(self.path)
except OSError:
pass
| https://github.com/conda/conda/issues/2778 | Traceback (most recent call last):
File "/opt/anaconda/bin/conda-env", line 6, in <module>
sys.exit(conda_env.cli.main.main())
File "/opt/anaconda/lib/python3.5/site-packages/conda_env/cli/main.py", line 68, in main
return args_func(args, parser)
File "/opt/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line ... | PermissionError |
def get_rc_urls():
if rc is None or rc.get("channels") is None:
return []
if "system" in rc["channels"]:
raise RuntimeError("system cannot be used in .condarc")
return rc["channels"]
| def get_rc_urls():
if rc.get("channels") is None:
return []
if "system" in rc["channels"]:
raise RuntimeError("system cannot be used in .condarc")
return rc["channels"]
| https://github.com/conda/conda/issues/2891 | $ conda info
Traceback (most recent call last):
File "/Users/jenns/anaconda/bin/conda", line 6, in <module>
sys.exit(main())
File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 61, in main
from conda.cli import conda_argparse
File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/cli... | AttributeError |
def print_explicit(prefix, add_md5=False):
if not isdir(prefix):
error_and_exit("Error: environment does not exist: %s" % prefix)
print_export_header()
print("@EXPLICIT")
for meta in sorted(linked_data(prefix).values(), key=lambda x: x["name"]):
url = meta.get("url")
if not url o... | def print_explicit(prefix, add_md5=False):
import json
if not isdir(prefix):
error_and_exit("Error: environment does not exist: %s" % prefix)
print_export_header()
print("@EXPLICIT")
meta_dir = join(prefix, "conda-meta")
for fn in sorted(os.listdir(meta_dir)):
if not fn.endswit... | https://github.com/conda/conda/issues/2781 | [root@42d0710d45b6 /]# conda index /opt/packages/linux-64/
updating index in: /opt/packages/linux-64
[root@42d0710d45b6 /]# ls /opt/packages/linux-64/
numpy-1.11.0-py35_1.tar.bz2 repodata.json repodata.json.bz2
[root@42d0710d45b6 /]# conda install -c file:///opt/packages --yes numpy
Fetching package metadata ........... | KeyError |
def url_channel(url):
parts = (url or "").rsplit("/", 2)
if len(parts) == 1:
return "<unknown>", "<unknown>"
if len(parts) == 2:
return parts[0], parts[0]
if url.startswith("file://") and parts[1] not in ("noarch", subdir):
# Explicit file-based URLs are denoted with a '/' in the... | def url_channel(url):
if url is None:
return None, "<unknown>"
channel = url.rsplit("/", 2)[0]
schannel = canonical_channel_name(channel)
if url.startswith("file://") and schannel != "local":
channel = schannel = url.rsplit("/", 1)[0]
return channel, schannel
| https://github.com/conda/conda/issues/2781 | [root@42d0710d45b6 /]# conda index /opt/packages/linux-64/
updating index in: /opt/packages/linux-64
[root@42d0710d45b6 /]# ls /opt/packages/linux-64/
numpy-1.11.0-py35_1.tar.bz2 repodata.json repodata.json.bz2
[root@42d0710d45b6 /]# conda install -c file:///opt/packages --yes numpy
Fetching package metadata ........... | KeyError |
def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
meta_file = join(prefix, "conda-meta", dname + ".json")
if rec is None:
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
l... | def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
meta_file = join(prefix, "conda-meta", dname + ".json")
if rec is None:
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
l... | https://github.com/conda/conda/issues/2781 | [root@42d0710d45b6 /]# conda index /opt/packages/linux-64/
updating index in: /opt/packages/linux-64
[root@42d0710d45b6 /]# ls /opt/packages/linux-64/
numpy-1.11.0-py35_1.tar.bz2 repodata.json repodata.json.bz2
[root@42d0710d45b6 /]# conda install -c file:///opt/packages --yes numpy
Fetching package metadata ........... | KeyError |
def explicit(
specs, prefix, verbose=False, force_extract=True, fetch_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = RM_FETCHED, FETCH, RM_EXTRACTED, EXTRACT, UNLINK, LINK
linked = {name_dist(dist): dist for dist in install_linked(prefix)}
f... | def explicit(
specs, prefix, verbose=False, force_extract=True, fetch_args=None, index=None
):
actions = defaultdict(list)
actions["PREFIX"] = prefix
actions["op_order"] = RM_FETCHED, FETCH, RM_EXTRACTED, EXTRACT, UNLINK, LINK
linked = {name_dist(dist): dist for dist in install_linked(prefix)}
f... | https://github.com/conda/conda/issues/2781 | [root@42d0710d45b6 /]# conda index /opt/packages/linux-64/
updating index in: /opt/packages/linux-64
[root@42d0710d45b6 /]# ls /opt/packages/linux-64/
numpy-1.11.0-py35_1.tar.bz2 repodata.json repodata.json.bz2
[root@42d0710d45b6 /]# conda install -c file:///opt/packages --yes numpy
Fetching package metadata ........... | KeyError |
def add_unknown(index, priorities):
priorities = {p[0]: p[1] for p in itervalues(priorities)}
maxp = max(itervalues(priorities)) + 1 if priorities else 1
for dist, info in iteritems(package_cache()):
schannel, dname = dist2pair(dist)
fname = dname + ".tar.bz2"
fkey = dist + ".tar.bz2... | def add_unknown(index, priorities):
priorities = {p[0]: p[1] for p in itervalues(priorities)}
maxp = max(itervalues(priorities)) + 1 if priorities else 1
for dist, info in iteritems(package_cache()):
schannel, dname = dist2pair(dist)
fname = dname + ".tar.bz2"
fkey = dist + ".tar.bz2... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def create_meta(prefix, dist, info_dir, extra_info):
"""
Create the conda metadata, in a given prefix, for a given package.
"""
# read info/index.json first
with open(join(info_dir, "index.json")) as fi:
meta = json.load(fi)
# add extra info, add to our intenral cache
meta.update(ext... | def create_meta(prefix, dist, info_dir, extra_info):
"""
Create the conda metadata, in a given prefix, for a given package.
"""
# read info/index.json first
with open(join(info_dir, "index.json")) as fi:
meta = json.load(fi)
# add extra info, add to our intenral cache
meta.update(ext... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
meta_file = join(prefix, "conda-meta", dname + ".json")
if rec is None:
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
l... | def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
meta_file = join(prefix, "conda-meta", dname + ".json")
if rec is None:
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
l... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def clone_env(prefix1, prefix2, verbose=True, quiet=False, fetch_args=None):
"""
clone existing prefix1 into new prefix2
"""
untracked_files = untracked(prefix1)
# Discard conda and any package that depends on it
drecs = linked_data(prefix1)
filter = {}
found = True
while found:
... | def clone_env(prefix1, prefix2, verbose=True, quiet=False, fetch_args=None):
"""
clone existing prefix1 into new prefix2
"""
untracked_files = untracked(prefix1)
# Discard conda and any package that depends on it
drecs = linked_data(prefix1)
filter = {}
found = True
while found:
... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def make_icon_url(info):
if info.get("channel") and info.get("icon"):
base_url = dirname(info["channel"])
icon_fn = info["icon"]
# icon_cache_path = join(pkgs_dir, 'cache', icon_fn)
# if isfile(icon_cache_path):
# return url_path(icon_cache_path)
return "%s/icons/%... | def make_icon_url(info):
if "channel" in info and "icon" in info:
base_url = dirname(info["channel"])
icon_fn = info["icon"]
# icon_cache_path = join(pkgs_dir, 'cache', icon_fn)
# if isfile(icon_cache_path):
# return url_path(icon_cache_path)
return "%s/icons/%s" %... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def display_actions(actions, index, show_channel_urls=None):
if show_channel_urls is None:
show_channel_urls = config_show_channel_urls
def channel_str(rec):
if rec.get("schannel"):
return rec["schannel"]
if rec.get("url"):
return url_channel(rec["url"])[1]
... | def display_actions(actions, index, show_channel_urls=None):
if show_channel_urls is None:
show_channel_urls = config_show_channel_urls
def channel_str(rec):
if "schannel" in rec:
return rec["schannel"]
if "url" in rec:
return url_channel(rec["url"])[1]
i... | https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def channel_str(rec):
if rec.get("schannel"):
return rec["schannel"]
if rec.get("url"):
return url_channel(rec["url"])[1]
if rec.get("channel"):
return canonical_channel_name(rec["channel"])
return "<unknown>"
| def channel_str(rec):
if "schannel" in rec:
return rec["schannel"]
if "url" in rec:
return url_channel(rec["url"])[1]
if "channel" in rec:
return canonical_channel_name(rec["channel"])
return "<unknown>"
| https://github.com/conda/conda/issues/2746 | % conda create -p ~/anaclone --clone root
Source: /Users/ijstokes/anaconda
Destination: /Users/ijstokes/anaclone
The following packages cannot be cloned out of the root environment:
- conda-4.1.1-py27_0
- conda-build-1.20.3-py27_0
Packages: 332
Files: 16134
An unexpected error has occurred, please consider sending... | TypeError |
def is_url(url):
if url:
p = urlparse.urlparse(url)
return p.netloc != "" or p.scheme == "file"
| def is_url(url):
return url and urlparse.urlparse(url).scheme != ""
| https://github.com/conda/conda/issues/2642 | ________________________ IntegrationTests.test_python3 ________________________
Traceback (most recent call last):
File "C:\projects\conda\tests\test_create.py", line 146, in test_python3
run_command(Commands.INSTALL, prefix, flask_tar_file)
File "C:\projects\conda\tests\test_create.py", line 104, in run_command
args.f... | RuntimeError |
def update_prefix(path, new_prefix, placeholder=prefix_placeholder, mode="text"):
if on_win:
# force all prefix replacements to forward slashes to simplify need to escape backslashes
# replace with unix-style path separators
new_prefix = new_prefix.replace("\\", "/")
path = os.path.real... | def update_prefix(path, new_prefix, placeholder=prefix_placeholder, mode="text"):
if on_win:
# force all prefix replacements to forward slashes to simplify need to escape backslashes
# replace with unix-style path separators
new_prefix = new_prefix.replace("\\", "/")
path = os.path.real... | https://github.com/conda/conda/issues/2697 | prepending C:\\Users\\Alessandro\\Anaconda3 and C:\\Users\\Alessandro\\Anaconda3
\\Library\\mingw-w64\\bin and C:\\Users\\Alessandro\\Anaconda3\\Library\\usr\\bi
n and C:\\Users\\Alessandro\\Anaconda3\\Library\\bin and C:\\Users\\Alessandro\\
Anaconda3\\Scripts to PATH
((Anaconda3)) C:\Users\Alessandro>conda info
Curr... | PermissionError |
def extract(dist):
"""
Extract a package, i.e. make a package available for linkage. We assume
that the compressed package is located in the packages directory.
"""
rec = package_cache()[dist]
url = rec["urls"][0]
fname = rec["files"][0]
assert url and fname
pkgs_dir = dirname(fname)... | def extract(dist):
"""
Extract a package, i.e. make a package available for linkage. We assume
that the compressed package is located in the packages directory.
"""
rec = package_cache()[dist]
url = rec["urls"][0]
fname = rec["files"][0]
assert url and fname
pkgs_dir = dirname(fname)... | https://github.com/conda/conda/issues/2697 | prepending C:\\Users\\Alessandro\\Anaconda3 and C:\\Users\\Alessandro\\Anaconda3
\\Library\\mingw-w64\\bin and C:\\Users\\Alessandro\\Anaconda3\\Library\\usr\\bi
n and C:\\Users\\Alessandro\\Anaconda3\\Library\\bin and C:\\Users\\Alessandro\\
Anaconda3\\Scripts to PATH
((Anaconda3)) C:\Users\Alessandro>conda info
Curr... | PermissionError |
def main():
from optparse import OptionParser
p = OptionParser(description="conda link tool used by installer")
p.add_option(
"--file",
action="store",
help="path of a file containing distributions to link, "
"by default all packages extracted in the cache are "
"li... | def main():
from optparse import OptionParser
p = OptionParser(description="conda link tool used by installer")
p.add_option(
"--file",
action="store",
help="path of a file containing distributions to link, "
"by default all packages extracted in the cache are "
"li... | https://github.com/conda/conda/issues/2697 | prepending C:\\Users\\Alessandro\\Anaconda3 and C:\\Users\\Alessandro\\Anaconda3
\\Library\\mingw-w64\\bin and C:\\Users\\Alessandro\\Anaconda3\\Library\\usr\\bi
n and C:\\Users\\Alessandro\\Anaconda3\\Library\\bin and C:\\Users\\Alessandro\\
Anaconda3\\Scripts to PATH
((Anaconda3)) C:\Users\Alessandro>conda info
Curr... | PermissionError |
def ensure_linked_actions(
dists, prefix, index=None, force=False, always_copy=False, shortcuts=False
):
actions = defaultdict(list)
actions[inst.PREFIX] = prefix
actions["op_order"] = (
inst.RM_FETCHED,
inst.FETCH,
inst.RM_EXTRACTED,
inst.EXTRACT,
inst.UNLINK,
... | def ensure_linked_actions(
dists, prefix, index=None, force=False, always_copy=False, shortcuts=False
):
actions = defaultdict(list)
actions[inst.PREFIX] = prefix
actions["op_order"] = (
inst.RM_FETCHED,
inst.FETCH,
inst.RM_EXTRACTED,
inst.EXTRACT,
inst.UNLINK,
... | https://github.com/conda/conda/issues/2710 | [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
... | TypeError |
def get_packages(installed, regex):
pat = re.compile(regex, re.I) if regex else None
for dist in sorted(installed, key=lambda x: x.lower()):
name = name_dist(dist)
if pat and pat.search(name) is None:
continue
yield dist
| def get_packages(installed, regex):
pat = re.compile(regex, re.I) if regex else None
for dist in sorted(installed, key=str.lower):
name = name_dist(dist)
if pat and pat.search(name) is None:
continue
yield dist
| https://github.com/conda/conda/issues/2700 | Traceback (most recent call last):
File "C:\Python\Scripts\conda-script.py", line 5, in <module>
sys.exit(main())
File "C:\Python\lib\site-packages\conda\cli\main.py", line 120, in main
args_func(args, p)
File "C:\Python\lib\site-packages\conda\cli\main.py", line 127, in args_func
args.func(args, p)
File "C:\Python\lib... | Exception |
def list_packages(
prefix, installed, regex=None, format="human", show_channel_urls=show_channel_urls
):
res = 1
result = []
for dist in get_packages(installed, regex):
res = 0
if format == "canonical":
result.append(dist)
continue
if format == "export":
... | def list_packages(
prefix, installed, regex=None, format="human", show_channel_urls=show_channel_urls
):
res = 1
result = []
for dist in get_packages(installed, regex):
res = 0
if format == "canonical":
result.append(dist)
continue
if format == "export":
... | https://github.com/conda/conda/issues/2700 | Traceback (most recent call last):
File "C:\Python\Scripts\conda-script.py", line 5, in <module>
sys.exit(main())
File "C:\Python\lib\site-packages\conda\cli\main.py", line 120, in main
args_func(args, p)
File "C:\Python\lib\site-packages\conda\cli\main.py", line 127, in args_func
args.func(args, p)
File "C:\Python\lib... | Exception |
def parse_egg_info(path):
"""
Parse an .egg-info file and return its canonical distribution name
"""
info = {}
for line in open(path, encoding="utf-8"):
line = line.strip()
m = pat.match(line)
if m:
key = m.group(1).lower()
info[key] = m.group(2)
... | def parse_egg_info(path):
"""
Parse an .egg-info file and return its canonical distribution name
"""
info = {}
for line in open(path):
line = line.strip()
m = pat.match(line)
if m:
key = m.group(1).lower()
info[key] = m.group(2)
try:
... | https://github.com/conda/conda/issues/2700 | Traceback (most recent call last):
File "C:\Python\Scripts\conda-script.py", line 5, in <module>
sys.exit(main())
File "C:\Python\lib\site-packages\conda\cli\main.py", line 120, in main
args_func(args, p)
File "C:\Python\lib\site-packages\conda\cli\main.py", line 127, in args_func
args.func(args, p)
File "C:\Python\lib... | Exception |
def get_egg_info(prefix, all_pkgs=False):
"""
Return a set of canonical names of all Python packages (in `prefix`),
by inspecting the .egg-info files inside site-packages.
By default, only untracked (not conda installed) .egg-info files are
considered. Setting `all_pkgs` to True changes this.
"... | def get_egg_info(prefix, all_pkgs=False):
"""
Return a set of canonical names of all Python packages (in `prefix`),
by inspecting the .egg-info files inside site-packages.
By default, only untracked (not conda installed) .egg-info files are
considered. Setting `all_pkgs` to True changes this.
"... | https://github.com/conda/conda/issues/2700 | Traceback (most recent call last):
File "C:\Python\Scripts\conda-script.py", line 5, in <module>
sys.exit(main())
File "C:\Python\lib\site-packages\conda\cli\main.py", line 120, in main
args_func(args, p)
File "C:\Python\lib\site-packages\conda\cli\main.py", line 127, in args_func
args.func(args, p)
File "C:\Python\lib... | Exception |
def main():
from conda.config import root_env_name, root_dir, changeps1
import conda.install
if "-h" in sys.argv or "--help" in sys.argv:
# all execution paths sys.exit at end.
help(sys.argv[1], sys.argv[2])
shell = sys.argv[2]
shelldict = shells[shell]
if sys.argv[1] == "..act... | def main():
from conda.config import root_env_name, root_dir, changeps1
import conda.install
if "-h" in sys.argv or "--help" in sys.argv:
# all execution paths sys.exit at end.
help(sys.argv[1], sys.argv[2])
shell = sys.argv[2]
shelldict = shells[shell]
if sys.argv[1] == "..act... | https://github.com/conda/conda/issues/2680 | $ conda activate myenv
Traceback (most recent call last):
File "/home/jrodriguez/.local/anaconda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/jrodriguez/.local/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 48, in main
activate.main()
File "/home/jrodriguez/.local/anaconda/lib/python3.5/s... | KeyError |
def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
meta_file = join(prefix, "conda-meta", dname + ".json")
if rec is None:
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
l... | def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
if rec is None:
meta_file = join(prefix, "conda-meta", dname + ".json")
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
... | https://github.com/conda/conda/issues/2599 | $ CIO_TEST=3 conda update pycrypto
...
Traceback (most recent call last):
File "/Users/ilan/python/bin/conda", line 6, in <module>
sys.exit(conda.cli.main.main())
File "/Users/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/Users/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func... | KeyError |
def add_defaults_to_specs(r, linked, specs, update=False):
# TODO: This should use the pinning mechanism. But don't change the API:
# cas uses it.
if r.explicit(specs):
return
log.debug("H0 specs=%r" % specs)
linked = [d if d.endswith(".tar.bz2") else d + ".tar.bz2" for d in linked]
name... | def add_defaults_to_specs(r, linked, specs, update=False):
# TODO: This should use the pinning mechanism. But don't change the API:
# cas uses it.
if r.explicit(specs):
return
log.debug("H0 specs=%r" % specs)
linked = [d if d.endswith(".tar.bz2") else d + ".tar.bz2" for d in linked]
name... | https://github.com/conda/conda/issues/2599 | $ CIO_TEST=3 conda update pycrypto
...
Traceback (most recent call last):
File "/Users/ilan/python/bin/conda", line 6, in <module>
sys.exit(conda.cli.main.main())
File "/Users/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/Users/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func... | KeyError |
def get_index(
channel_urls=(),
prepend=True,
platform=None,
use_local=False,
use_cache=False,
unknown=False,
offline=False,
prefix=None,
):
"""
Return the index of packages available on the channels
If prepend=False, only the channels passed in as arguments are used.
If... | def get_index(
channel_urls=(),
prepend=True,
platform=None,
use_local=False,
use_cache=False,
unknown=False,
offline=False,
prefix=None,
):
"""
Return the index of packages available on the channels
If prepend=False, only the channels passed in as arguments are used.
If... | https://github.com/conda/conda/issues/2538 | Traceback (most recent call last):
File "/home/ilan/a/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.py", l... | TypeError |
def package_cache():
"""
Initializes the package cache. Each entry in the package cache
dictionary contains three lists:
- urls: the URLs used to refer to that package
- files: the full pathnames to fetched copies of that package
- dirs: the full pathnames to extracted copies of that package
... | def package_cache():
"""
Initializes the package cache. Each entry in the package cache
dictionary contains three lists:
- urls: the URLs used to refer to that package
- files: the full pathnames to fetched copies of that package
- dirs: the full pathnames to extracted copies of that package
... | https://github.com/conda/conda/issues/2596 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda-build", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/ilan/conda-build/bin/conda-build", line 5, in <module>
sys.exit(main())
File "/home/ilan/conda-build/conda_build/main_build.py", line 140, in main
args_fun... | OSError |
def list_packages(
prefix, installed, regex=None, format="human", show_channel_urls=show_channel_urls
):
res = 1
result = []
for dist in get_packages(installed, regex):
res = 0
if format == "canonical":
result.append(dist)
continue
if format == "export":
... | def list_packages(
prefix, installed, regex=None, format="human", show_channel_urls=show_channel_urls
):
res = 1
result = []
for dist in get_packages(installed, regex):
res = 0
if format == "canonical":
result.append(dist)
continue
if format == "export":
... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def pretty_diff(diff):
added = {}
removed = {}
for s in diff:
fn = s[1:]
name, version, _, channel = dist2quad(fn)
if channel != "defaults":
version += " (%s)" % channel
if s.startswith("-"):
removed[name.lower()] = version
elif s.startswith("+... | def pretty_diff(diff):
added = {}
removed = {}
for s in diff:
fn = s[1:]
name, version, unused_build = dist2quad(fn, channel=False)
if s.startswith("-"):
removed[name.lower()] = version
elif s.startswith("+"):
added[name.lower()] = version
changed ... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def object_log(self):
result = []
for i, (date, content, unused_com) in enumerate(self.parse()):
# Based on Mateusz's code; provides more details about the
# history event
event = {
"date": date,
"rev": i,
"install": [],
"remove": [],
... | def object_log(self):
result = []
for i, (date, content, unused_com) in enumerate(self.parse()):
# Based on Mateusz's code; provides more details about the
# history event
event = {
"date": date,
"rev": i,
"install": [],
"remove": [],
... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def dist2quad(dist):
channel, dist = dist2pair(dist)
parts = dist.rsplit("-", 2) + ["", ""]
return (parts[0], parts[1], parts[2], channel)
| def dist2quad(dist, channel=True):
dist = str(dist)
if dist.endswith(".tar.bz2"):
dist = dist[:-8]
parts = dist.rsplit("-", 2)
if len(parts) < 3:
parts = parts + [""] * (3 - len(parts))
chan_name, version, build = parts
if not channel:
return chan_name, version, build
... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def name_dist(dist):
return dist2name(dist)
| def name_dist(dist):
return dist2quad(dist)[0]
| https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def create_meta(prefix, dist, info_dir, extra_info):
"""
Create the conda metadata, in a given prefix, for a given package.
"""
# read info/index.json first
with open(join(info_dir, "index.json")) as fi:
meta = json.load(fi)
# add extra info, add to our intenral cache
meta.update(ext... | def create_meta(prefix, dist, info_dir, extra_info):
"""
Create the conda metadata, in a given prefix, for a given package.
"""
# read info/index.json first
with open(join(info_dir, "index.json")) as fi:
meta = json.load(fi)
# add extra info, add to our intenral cache
meta.update(ext... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def try_hard_link(pkgs_dir, prefix, dist):
dist = dist2filename(dist, "")
src = join(pkgs_dir, dist, "info", "index.json")
dst = join(prefix, ".tmp-%s" % dist)
assert isfile(src), src
assert not isfile(dst), dst
try:
if not isdir(prefix):
os.makedirs(prefix)
_link(src... | def try_hard_link(pkgs_dir, prefix, dist):
dist = _dist2filename(dist, "")
src = join(pkgs_dir, dist, "info", "index.json")
dst = join(prefix, ".tmp-%s" % dist)
assert isfile(src), src
assert not isfile(dst), dst
try:
if not isdir(prefix):
os.makedirs(prefix)
_link(sr... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def find_new_location(dist):
"""
Determines the download location for the given package, and the name
of a package, if any, that must be removed to make room. If the
given package is already in the cache, it returns its current location,
under the assumption that it will be overwritten. If the confl... | def find_new_location(dist):
"""
Determines the download location for the given package, and the name
of a package, if any, that must be removed to make room. If the
given package is already in the cache, it returns its current location,
under the assumption that it will be overwritten. If the confl... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def load_linked_data(prefix, dist, rec=None):
schannel, dname = dist2pair(dist)
if rec is None:
meta_file = join(prefix, "conda-meta", dname + ".json")
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
... | def load_linked_data(prefix, dist, rec=None):
schannel, dname = _dist2pair(dist)
if rec is None:
meta_file = join(prefix, "conda-meta", dname + ".json")
try:
with open(meta_file) as fi:
rec = json.load(fi)
except IOError:
return None
else:
... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def delete_linked_data(prefix, dist, delete=True):
recs = linked_data_.get(prefix)
if recs and dist in recs:
del recs[dist]
if delete:
meta_path = join(prefix, "conda-meta", dist2filename(dist, ".json"))
if isfile(meta_path):
os.unlink(meta_path)
| def delete_linked_data(prefix, dist, delete=True):
recs = linked_data_.get(prefix)
if recs and dist in recs:
del recs[dist]
if delete:
meta_path = join(prefix, "conda-meta", _dist2filename(dist, ".json"))
if isfile(meta_path):
os.unlink(meta_path)
| https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def link(prefix, dist, linktype=LINK_HARD, index=None):
"""
Set up a package in a specified (environment) prefix. We assume that
the package has been extracted (using extract() above).
"""
index = index or {}
source_dir = is_extracted(dist)
assert source_dir is not None
pkgs_dir = dirna... | def link(prefix, dist, linktype=LINK_HARD, index=None):
"""
Set up a package in a specified (environment) prefix. We assume that
the package has been extracted (using extract() above).
"""
index = index or {}
source_dir = is_extracted(dist)
assert source_dir is not None
pkgs_dir = dirna... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def ensure_linked_actions(dists, prefix, index=None, force=False, always_copy=False):
actions = defaultdict(list)
actions[inst.PREFIX] = prefix
actions["op_order"] = (
inst.RM_FETCHED,
inst.FETCH,
inst.RM_EXTRACTED,
inst.EXTRACT,
inst.UNLINK,
inst.LINK,
)
... | def ensure_linked_actions(dists, prefix, index=None, force=False, always_copy=False):
actions = defaultdict(list)
actions[inst.PREFIX] = prefix
actions["op_order"] = (
inst.RM_FETCHED,
inst.FETCH,
inst.RM_EXTRACTED,
inst.EXTRACT,
inst.UNLINK,
inst.LINK,
)
... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def add_defaults_to_specs(r, linked, specs, update=False):
# TODO: This should use the pinning mechanism. But don't change the API:
# cas uses it.
if r.explicit(specs):
return
log.debug("H0 specs=%r" % specs)
linked = [fn if fn.endswith(".tar.bz2") else fn + ".tar.bz2" for fn in linked]
... | def add_defaults_to_specs(r, linked, specs, update=False):
# TODO: This should use the pinning mechanism. But don't change the API:
# cas uses it.
if r.explicit(specs):
return
log.debug("H0 specs=%r" % specs)
names_linked = {install.name_dist(dist): dist for dist in linked}
names_ms = {M... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
def __init__(self, index, sort=False, processed=False):
self.index = index
if not processed:
for fkey, info in iteritems(index.copy()):
if fkey.endswith("]"):
continue
for fstr in chain(
info.get("features", "").split(),
info.get("t... | def __init__(self, index, sort=False, processed=False):
self.index = index
if not processed:
for fkey, info in iteritems(index.copy()):
if fkey.endswith("]"):
continue
for fstr in chain(
info.get("features", "").split(),
info.get("t... | https://github.com/conda/conda/issues/2570 | Traceback (most recent call last):
File "/home/ilan/minonda/bin/conda", line 6, in <module>
sys.exit(main())
File "/home/ilan/conda/conda/cli/main.py", line 120, in main
args_func(args, p)
File "/home/ilan/conda/conda/cli/main.py", line 127, in args_func
args.func(args, p)
File "/home/ilan/conda/conda/cli/main_install.... | TypeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.