Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda install error: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 58 (char 57) #9590

Open
valvesss opened this issue Jan 10, 2020 · 29 comments

Comments

@valvesss
Copy link

Current Behavior

Collecting package metadata (current_repodata.json): failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1078, in __call__
    return func(*args, **kwargs)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/cli/install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 262, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 415, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/solve.py", line 1004, in _prepare
    self.subdirs, prepared_specs, self._repodata_fn)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/index.py", line 228, in get_reduced_index
    repodata_fn=repodata_fn)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 105, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "/tmp/miniconda3/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "/tmp/miniconda3/lib/python3.7/concurrent/futures/_base.py", line 435, in result
    return self.__get_result()
  File "/tmp/miniconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/tmp/miniconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 98, in <lambda>
    package_ref_or_match_spec))
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 110, in query
    self.load()
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 174, in load
    _internal_state = self._load()
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 276, in _load
    _internal_state = self._process_raw_repodata_str(raw_repodata_str)
  File "/tmp/miniconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 349, in _process_raw_repodata_str
    json_obj = json.loads(raw_repodata_str or '{}')
  File "/tmp/miniconda3/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/tmp/miniconda3/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/tmp/miniconda3/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 58 (char 57)

Steps to Reproduce

conda install anypackage

Expected Behavior

The package to be installed!

Environment Information

`conda info`

     active environment : base
    active env location : /tmp/miniconda3
            shell level : 1
       user config file : /home/operacao/.condarc
 populated config files : /home/operacao/.condarc
          conda version : 4.8.1
    conda-build version : not installed
         python version : 3.7.4.final.0
       virtual packages : __glibc=2.17
       base environment : /tmp/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /tmp/miniconda3/pkgs
                          /home/operacao/.conda/pkgs
       envs directories : /tmp/miniconda3/envs
                          /home/operacao/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.4 Linux/3.10.0-862.11.6.el7.x86_64 rhel/7.5 glibc/2.17
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

`conda config --show-sources`

==> /home/myuser/.condarc <==
ssl_verify: False
proxy_servers:
  http: my proxy
  https: my proxy

`conda list --show-channel-urls`


# packages in environment at /tmp/miniconda3:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
alembic                   1.3.2                      py_0    conda-forge
asn1crypto                1.2.0                    py37_0    defaults
async_generator           1.10                       py_0    conda-forge
attrs                     19.3.0                     py_0    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    3.1.0                      py_0    conda-forge
blinker                   1.4                        py_1    conda-forge
ca-certificates           2019.11.28           hecc5488_0    conda-forge
certifi                   2019.11.28               py37_0    conda-forge
certipy                   0.1.3                      py_0    conda-forge
cffi                      1.13.2           py37h2e261b9_0    defaults
chardet                   3.0.4                 py37_1003    defaults
conda                     4.8.1                    py37_0    defaults
conda-package-handling    1.6.0            py37h7b6447c_0    defaults
configurable-http-proxy   4.2.0           node13_he01fd0c_2    conda-forge
cryptography              2.8              py37h1ba5d50_0    defaults
cython                    0.29.14          py37he6710b0_0    anaconda
decorator                 4.4.1                      py_0    conda-forge
defusedxml                0.6.0                      py_0    conda-forge
entrypoints               0.3                   py37_1000    conda-forge
icu                       64.2                 he1b5a44_1    conda-forge
idna                      2.8                      py37_0    defaults
importlib_metadata        1.3.0                    py37_0    conda-forge
ipykernel                 5.1.3            py37h5ca1d4c_0    conda-forge
ipython                   7.11.1           py37h5ca1d4c_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.15.2                   py37_0    conda-forge
jinja2                    2.10.3                     py_0    conda-forge
jsonschema                3.2.0                    py37_0    conda-forge
jupyter_client            5.3.4                    py37_0    conda-forge
jupyter_core              4.6.1                    py37_0    conda-forge
jupyterhub                1.0.0                    py37_0    conda-forge
krb5                      1.16.4               h173b8e3_0    defaults
libcurl                   7.65.3               hda55be3_0    conda-forge
libedit                   3.1.20181209         hc058e9b_0    defaults
libffi                    3.2.1                hd88cf55_4    defaults
libgcc-ng                 9.1.0                hdf63c60_0    defaults
libsodium                 1.0.17               h516909a_0    conda-forge
libssh2                   1.8.2                h22169c7_2    conda-forge
libstdcxx-ng              9.1.0                hdf63c60_0    defaults
libuv                     1.34.0               h516909a_0    conda-forge
mako                      1.1.0                      py_0    conda-forge
markupsafe                1.1.1            py37h516909a_0    conda-forge
mistune                   0.8.4           py37h516909a_1000    conda-forge
more-itertools            8.0.2                      py_0    conda-forge
nbconvert                 5.6.1                    py37_0    conda-forge
nbformat                  5.0.3                      py_0    conda-forge
ncurses                   6.1                  he6710b0_1    defaults
nodejs                    13.6.0               h10a4023_0    conda-forge
notebook                  6.0.1                    py37_0    conda-forge
oauthlib                  3.0.1                      py_0    conda-forge
openssl                   1.1.1d               h516909a_0    conda-forge
pamela                    1.0.0                      py_0    conda-forge
pandoc                    2.9.1.1                       0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.5.2                      py_0    conda-forge
pexpect                   4.7.0                    py37_0    conda-forge
pickleshare               0.7.5                 py37_1000    conda-forge
pip                       19.3.1                   py37_0    defaults
prometheus_client         0.7.1                      py_0    conda-forge
prompt_toolkit            3.0.2                      py_0    conda-forge
ptyprocess                0.6.0                   py_1001    conda-forge
pycosat                   0.6.3            py37h7b6447c_0    defaults
pycparser                 2.19                     py37_0    defaults
pycurl                    7.43.0.3         py37h16ce93b_1    conda-forge
pygments                  2.5.2                      py_0    conda-forge
pyjwt                     1.7.1                      py_0    conda-forge
pyopenssl                 19.1.0                   py37_0    defaults
pyrsistent                0.15.7           py37h516909a_0    conda-forge
pysocks                   1.7.1                    py37_0    defaults
python                    3.7.4                h265db76_1    defaults
python-dateutil           2.8.1                      py_0    conda-forge
python-editor             1.0.4                      py_0    conda-forge
pyzmq                     18.1.1           py37h1768529_0    conda-forge
readline                  7.0                  h7b6447c_5    defaults
requests                  2.22.0                   py37_1    defaults
ruamel_yaml               0.15.87          py37h7b6447c_0    defaults
send2trash                1.5.0                      py_0    conda-forge
setuptools                44.0.0                   py37_0    defaults
six                       1.13.0                   py37_0    defaults
sqlalchemy                1.3.12           py37h516909a_0    conda-forge
sqlite                    3.30.1               h7b6447c_0    defaults
terminado                 0.8.3                    py37_0    conda-forge
testpath                  0.4.4                      py_0    conda-forge
tk                        8.6.8                hbc83047_0    defaults
tornado                   5.1.1           py37h14c3975_1000    conda-forge
tqdm                      4.40.2                     py_0    defaults
traitlets                 4.3.3                    py37_0    conda-forge
urllib3                   1.25.7                   py37_0    defaults
wcwidth                   0.1.8                      py_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.33.6                   py37_0    defaults
xz                        5.2.4                h14c3975_4    defaults
yaml                      0.1.7                had09818_2    defaults
zeromq                    4.3.2                he1b5a44_2    conda-forge
zipp                      0.6.0                      py_0    conda-forge
zlib                      1.2.11               h7b6447c_3    defaults

Help! :)

@MisterNajm
Copy link

This issue keeps us from using conda. Any updates?

@xingchensong
Copy link

same issue here :(

@Adithya-MN
Copy link

Have the same issue with conda 4.8.2

@dohunnim
Copy link

dohunnim commented Mar 5, 2020

Having the same issue with condo 4.8.2

@jose-pena-oxb
Copy link

Same issue here, Conda 4.8.3 hasn't solved this.

@JoostGevaert
Copy link

I have the same issue when trying to install jupyter.
Conda version: 4.8.3

@bruce0828
Copy link

I met the same problem. I solved it by delecting .condarc file.
You can see my solution here

@ijustlovemath
Copy link

Have this same issue on an Arch Linux install. Seems to be related to installing packages at the "conda install" step.

@jose-pena-oxb
Copy link

jose-pena-oxb commented Apr 30, 2020

I have noticed that this can happen when any of the conda repositories are not accessible. What was triggering this error in my case was a VPN connectivity issue.

@ijustlovemath
Copy link

@jose-pena-oxb Tried it again this morning and it seems like it's getting past that step; this error should be made far less opaque

@jontwo
Copy link

jontwo commented May 15, 2020

I got this error too, on conda 4.7.12. Automatic reporting is on, so you'll have the report :)

At the very least, it would help to tell us which repodata.json couldn't be read - I checked all the channels listed the the json files were all valid. The install worked the second time though, so maybe this is just a network issue that needs to be handled more gracefully.

@DanaAzouri
Copy link

Hi we had the same issue and we solved it by editing the .condarc file-
we removed all channels except the 'defaults' channel.

@shaojiestar
Copy link

I had the same issue and when I removed all channels except the 'defaults' channel
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json
So now I can't connect the default repo,and I can't use other repo
I don't know hao to resolve it .....
TOO BAD!!!!!!!!!

@jimowutong42
Copy link

我也遇到了同样的问题,发现并不需要删除或者修改.condarc文件。看起来这个问题是channels的索引json文件出错导致的,我用conda clean -i命令移除了index cache,然后正常了。
I also encountered the same problem and found that there was no need to delete or modify the .condarc file. It seemed that the problem was caused by an error in the indexing JSON file of Channels. I removed the index cache using the conda clean-i command and it worked fine.

@picsaver
Copy link

it worked when i removed .condarc file with rm $HOME/.condarc command. Conda version: 4.7.10

@Astronomoid
Copy link

Eventually deleting ~/.condarc worked

@jgallucci32
Copy link

This can be reproduced by creating the following ~/.condarc file

channel_alias: https://conda.anaconda.org
channels:
  - https://conda.anaconda.org
default_channels:
  - https://conda.anaconda.org

I first noticed this error when trying to configure JFrog Artifactory as a remote proxy for the conda-forge channel. I then tried to connect directly to the channel via the upstream URL and got this error (the example used above)

@jgallucci32
Copy link

Update, this can be fixed by adding /main to the end of the channels as follows

channel_alias: https://conda.anaconda.org
channels:
  - https://conda.anaconda.org/main
default_channels:
  - https://conda.anaconda.org/main

@Sheagu
Copy link

Sheagu commented Jan 22, 2022

我在删除 ~/.condarc 后又出现了 CondaHTTPError: HTTP 000 CONNECTION FAILED 的报错,然后我试了 ping www.baidu.com 没有反应,所以我觉得是网络问题,如果网好的话,应该是删除 ~/.condarc 就可以了。可惜我的网络问题没解决,解决了再来更新。

The same issue. After I deleted ~/.condarc, another error came as CondaHTTPError: HTTP 000 CONNECTION FAILED. Besides, I tried ping www.baidu.com, it didn't work. So I think it's a network issue. If you have the same problem, please 1) check if your network is OK, 2) If so, delete ~/.condarc and see if it work.

@pbabading
Copy link

我在删除 ~/.condarc 后又出现了 CondaHTTPError: HTTP 000 CONNECTION FAILED 的报错,然后我试了 ping www.baidu.com 没有反应,所以我觉得是网络问题,如果网好的话,应该是删除 ~/.condarc 就可以了。可惜我的网络问题没解决,解决了再来更新。

The same issue. After I deleted ~/.condarc, another error came as CondaHTTPError: HTTP 000 CONNECTION FAILED. Besides, I tried ping www.baidu.com, it didn't work. So I think it's a network issue. If you have the same problem, please 1) check if your network is OK, 2) If so, delete ~/.condarc and see if it work.

求问最后怎么解决的

@dogeBlessYou
Copy link

我也碰到一样的问题,后来发现原来是网络问题,连上网就好了

@momomobinx
Copy link

momomobinx commented Oct 14, 2022

conda 22.9.0
pip install pyecharts==1.9.1
and conda install error: json.decoder.JSONDecodeError
pip uninstall pyecharts==1.9.1
still conda install error: json.decoder.JSONDecodeError

@chuchong
Copy link

应该就是网络问题,我加上proxy就好了

@s4lm-xi
Copy link

s4lm-xi commented Aug 19, 2023

To sum up the solution for this issue, please find below the answers for both Linux and Windows as provided by (@jgallucci32). The comment clears up the solution a little more.

Initial Solution: Try deleting the ~/.condarc file

Windows:

CTRL + R type cmd and enter

then
cd C:\Users\YourUsername Add your username.

finally, delete
del condarc

Linux:

sudo rm -r ~/.condarc

2nd Solution (if the above solution didn't work, try this instead):

Windows:

CTRL + R type cmd and enter

then
cd C:\Users\YourUsername Add your username.

edit file
notepad condarc

Then, copy and paste the following text (provided by @jgallucci32):

channel_alias: https://conda.anaconda.org
channels:
  - https://conda.anaconda.org/main
default_channels:
  - https://conda.anaconda.org/main

Linux:

sudo nano ~/.condarc

delete the content of the file and paste the text above.

After following the provided steps, try reloading Anaconda and reactivating your environment again, and try installing a few packages to confirm if it's working.

@YongJieLai
Copy link

我在删除 ~/.condarc 后又出现了 CondaHTTPError: HTTP 000 CONNECTION FAILED 的报错,然后我试了 ping www.baidu.com 没有反应,所以我觉得是网络问题,如果网好的话,应该是删除 ~/.condarc 就可以了。可惜我的网络问题没解决,解决了再来更新。
The same issue. After I deleted ~/.condarc, another error came as CondaHTTPError: HTTP 000 CONNECTION FAILED. Besides, I tried ping www.baidu.com, it didn't work. So I think it's a network issue. If you have the same problem, please 1) check if your network is OK, 2) If so, delete ~/.condarc and see if it work.

求问最后怎么解决的

解决了没哥

@Sheagu
Copy link

Sheagu commented Sep 20, 2023

我在删除 ~/.condarc 后又出现了 CondaHTTPError: HTTP 000 CONNECTION FAILED 的报错,然后我试了 ping www.baidu.com 没有反应,所以我觉得是网络问题,如果网好的话,应该是删除 ~/.condarc 就可以了。可惜我的网络问题没解决,解决了再来更新。
The same issue. After I deleted ~/.condarc, another error came as CondaHTTPError: HTTP 000 CONNECTION FAILED. Besides, I tried ping www.baidu.com, it didn't work. So I think it's a network issue. If you have the same problem, please 1) check if your network is OK, 2) If so, delete ~/.condarc and see if it work.

求问最后怎么解决的

解决了没哥

网好了就可以了

@ZamirKhurshid
Copy link

If you are using VPN close the VPN then create the new conda environment it work fine in my case.

@alexfan07
Copy link

Same issue and was actually network problem. Try ping bing.com.

@Huangjpee
Copy link

连上代理就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests