Hi team, We ran a `conda update conda` (now we're...
# ask-metaflow
a
Hi team, We ran a
conda update conda
(now we're on version 23.7.3) and it seems to be causing trouble w/ Metaflow when bootstrapping the conda environment.
āœ… 1
Here's the error:
Copy code
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/metaflow/cli.py", line 1172, in main
    start(auto_envvar_prefix="METAFLOW", obj=state)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/core.py", line 829, in __call__
    return self.main(args, kwargs)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/core.py", line 610, in invoke
    return callback(args, kwargs)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/cli.py", line 691, in wrapper
    return func(args, kwargs)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/_vendor/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, args, kwargs)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/cli.py", line 828, in run
    before_run(obj, tags, decospecs + obj.environment.decospecs())
  File "/opt/conda/lib/python3.9/site-packages/metaflow/cli.py", line 886, in before_run
    obj.package = MetaflowPackage(
  File "/opt/conda/lib/python3.9/site-packages/metaflow/package.py", line 73, in __init__
    deco.package_init(flow, step.__name__, environment)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/plugins/conda/conda_step_decorator.py", line 355, in package_init
    self._prepare_step_environment(step, self.local_root)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/plugins/conda/conda_step_decorator.py", line 216, in _prepare_step_environment
    env_id = self._resolve_step_environment(ds_root)
  File "/opt/conda/lib/python3.9/site-packages/metaflow/plugins/conda/conda_step_decorator.py", line 124, in _resolve_step_environment
    CondaStepDecorator.conda = Conda()
  File "/opt/conda/lib/python3.9/site-packages/metaflow/plugins/conda/conda.py", line 43, in __init__
    if LooseVersion(self._info()["conda_version"]) < LooseVersion("4.6.0"):
  File "/opt/conda/lib/python3.9/site-packages/metaflow/plugins/conda/conda.py", line 111, in _info
    return json.loads(self._call_conda(["info"]))
  File "/opt/conda/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/opt/conda/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/conda/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
b
some questions on the setup for possible reproduction: • what version of metaflow is this running with? • what was the previous version of conda that seemingly worked? • is this running locally or on a remote platform? any difference in where it is executed?
b
It's this issue: https://github.com/Netflix/metaflow/issues/1496 e.g.
CONDA_JSON=1 conda info
doesn't return a JSON string, the fix is merged to Conda but not released yet
We downgraded to 23.5.2 until a fix is released
a
Thanks Max!
h
getting same error now 😟
@billowy-exabyte-36648 can you please tell me what you did? AFIK 23.5.2 is the l_atest - Conda 23.5.2 Python 3.11.3 released July 13, 2023_ I also downgraded to metaflow==2.9.11 but still get this JSON error … not sure what to do? Any help would be very much appreciated please! Thanks.
so I created a new environment with metaflow 2.9.11 and conda 22.11.1. I still get the JSON error. any ideas?
This may help? Thanks to @dry-beach-38304 the solution for me was to use: https://pypi.org/project/metaflow-netflixext/
b
@happy-wolf-7852 I think Metaflow uses the "system" conda which is installed in the "base" env, this worked for me:
conda install -n base "conda<23.7"
. Conda 23.7.4 was also released yesterday and maybe fixes it, I didn't try it yet
šŸ‘ 2