regro / rever

Releaser of Versions
https://regro.github.io/rever-docs/
BSD 3-Clause "New" or "Revised" License
75 stars 34 forks source link

Issue with conda actions #229

Open asmeurer opened 4 years ago

asmeurer commented 4 years ago

I'm still having issue with the conda support. It now works for the first action, but it breaks on the second action that uses it.

Traceback (most recent call last):
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/site-packages/rever/activity.xsh", line 83, in __call__
    self.func(*args, **kwargs)
  File "rever.xsh", line 31, in build_docs
    with run_in_conda_env(['python=3.8', 'sphinx', 'myst-parser', 'numpy', 'sympy']):
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/site-packages/rever/conda.xsh", line 45, in run_in_conda_env
    if env_exists(envname):
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/site-packages/rever/conda.xsh", line 10, in env_exists
    envs = json.loads($(conda env list --json))["envs"]
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/aaronmeurer/anaconda3/lib/python3.7/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)
rewinding to 44c09b62cb5785e44e58396777a0661444fac08f

It also printed the envs json to the terminal, which may be part of the problem.

asmeurer commented 4 years ago

Might be related to me having another env named rever-env but not in the envs directory (I have no idea how that happened, might be another bug which may or may not be fixed already). I deleted it and it worked.

scopatz commented 4 years ago

Can you reproduce this still?

asmeurer commented 4 years ago

Yeah, it just happened to me again doing a versioned-hdf5 release. I think it goes away after a second run because it doesn't re-run the first action. The other rever-env I guess was unrelated.

scopatz commented 4 years ago

Strange, I wonder why the test suite is passing then