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

Anaconda Navigator throws exception "AttributeError: 'bytes' object has no attribute 'copy'" #11002

Open
ijstokes opened this issue Jun 11, 2019 · 15 comments

Comments

@ijstokes
Copy link

Actual Behavior

I am running latest anaconda-navigator from the command line. I get hundreds of instances of this exception in the terminal:

Traceback (most recent call last):
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 496, in _conda_info_processed
    processed_info = self._process_conda_info(info)
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 607, in _process_conda_info
    processed_info = info.copy()
AttributeError: 'bytes' object has no attribute 'copy'

Expected Behavior

No exception, no stack-trace. I'd expect anaconda-navigator to either start and detach (so I get my command prompt back), or to only show logging output.

Steps to Reproduce

I'm not staring at the terminal window when I'm using Anaconda Navigator, so I'm not exactly sure what did it, but I haven't installed anything using AN, only used it for starting Jupyter and switching between my conda envs. Here are the first few rows of output (and after this the exception is repeated thousands of times):

$ anaconda-navigator
/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/conda_api.py:1364: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  data = yaml.load(f)
2019-06-09 14:45:12,324 - ERROR download_api._download:234
Invalid url https://www.anaconda.com/wp-content/uploads/2017/05/Webinar20-20Three20Ways20to20Move20your20Data20Science20Projects20to20Production.png

Traceback (most recent call last):
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 496, in _conda_info_processed
    processed_info = self._process_conda_info(info)
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 607, in _process_conda_info
    processed_info = info.copy()
AttributeError: 'bytes' object has no attribute 'copy'
Traceback (most recent call last):
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 496, in _conda_info_processed
    processed_info = self._process_conda_info(info)
  File "/envs/anaconda/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 607, in _process_conda_info
    processed_info = info.copy()
AttributeError: 'bytes' object has no attribute 'copy'
Anaconda or Miniconda version:

Latest miniconda from the last week or two. Not sure how to find out the actual number for this anymore.

Operating System:

macOS 10.14.5

conda info
conda info -a

     active environment : anaconda
    active env location : /envs/anaconda
            shell level : 2
       user config file : /Users/ijstokes/.condarc
 populated config files : /Users/ijstokes/.condarc
          conda version : 4.6.14
    conda-build version : not installed
         python version : 3.6.8.final.0
       base environment : /Users/ijstokes/conda  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/ijstokes/conda/pkgs
                          /Users/ijstokes/.conda/pkgs
       envs directories : /envs
                          /Users/ijstokes/conda/envs
                          /Users/ijstokes/.conda/envs
               platform : osx-64
             user-agent : conda/4.6.14 requests/2.18.4 CPython/3.6.8 Darwin/18.6.0 OSX/10.14.5
                UID:GID : 2553821:345243045
             netrc file : None
           offline mode : False

# conda environments:
#
base                     /Users/ijstokes/conda
mrepdev                  /Users/ijstokes/conda/envs/mrepdev
ana                      /envs/ana
anaconda              *  /envs/anaconda

sys.version: 3.6.8 |Anaconda, Inc.| (default, Dec 29 ...
sys.prefix: /Users/ijstokes/conda
sys.executable: /Users/ijstokes/conda/bin/python
conda location: /Users/ijstokes/conda/lib/python3.6/site-packages/conda
conda-build: None
conda-env: /Users/ijstokes/conda/bin/conda-env
user site dirs:

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: anaconda
CONDA_EXE: /Users/ijstokes/conda/bin/conda
CONDA_PREFIX: /envs/anaconda
CONDA_PREFIX_1: /Users/ijstokes/conda
CONDA_PROMPT_MODIFIER: (anaconda)
CONDA_PYTHON_EXE: /Users/ijstokes/conda/bin/python
CONDA_ROOT: /Users/ijstokes/conda
CONDA_SHLVL: 2
PATH: /Users/ijstokes/conda/bin:/envs/anaconda/bin:/Users/ijstokes/conda/condabin:/Users/ijstokes/conda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
conda list --show-channel-urls
# packages in environment at /envs/anaconda:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                   py37_0    defaults
anaconda                  custom                   py37_0    defaults
anaconda-client           1.7.2                    py37_0    defaults
anaconda-navigator        1.9.7                    py37_0    defaults
anaconda-project          0.8.2                    py37_0    defaults
appnope                   0.1.0                    py37_0    defaults
appscript                 1.1.0            py37h1de35cc_0    defaults
asn1crypto                0.24.0                   py37_0    defaults
astroid                   2.2.5                    py37_0    defaults
astropy                   3.1.2            py37h1de35cc_0    defaults
atomicwrites              1.3.0                    py37_1    defaults
attrs                     19.1.0                   py37_1    defaults
babel                     2.6.0                    py37_0    defaults
backcall                  0.1.0                    py37_0    defaults
backports                 1.0                      py37_1    defaults
backports.os              0.1.1                    py37_0    defaults
backports.shutil_get_terminal_size 1.0.0                    py37_2    defaults
beautifulsoup4            4.7.1                    py37_1    defaults
bitarray                  0.8.3            py37h1de35cc_0    defaults
bkcharts                  0.2                      py37_0    defaults
blas                      1.0                         mkl    defaults
bleach                    3.1.0                    py37_0    defaults
blosc                     1.15.0               hd9629dc_0    defaults
bokeh                     1.2.0                    py37_0    defaults
boto                      2.49.0                   py37_0    defaults
bottleneck                1.2.1            py37h1d22016_1    defaults
bzip2                     1.0.6                h1de35cc_5    defaults
ca-certificates           2019.5.15                     0    defaults
certifi                   2019.3.9                 py37_0    defaults
cffi                      1.12.2           py37hb5b8e2f_1    defaults
chardet                   3.0.4                    py37_1    defaults
click                     7.0                      py37_0    defaults
cloudpickle               0.8.0                    py37_0    defaults
clyent                    1.2.2                    py37_1    defaults
colorama                  0.4.1                    py37_0    defaults
contextlib2               0.5.5                    py37_0    defaults
cryptography              2.6.1            py37ha12b0ac_0    defaults
curl                      7.64.0               ha441bb4_2    defaults
cycler                    0.10.0                   py37_0    defaults
cython                    0.29.6           py37h0a44026_0    defaults
cytoolz                   0.9.0.1          py37h1de35cc_1    defaults
dask                      1.1.4                    py37_1    defaults
dask-core                 1.1.4                    py37_1    defaults
dbus                      1.13.6               h90a0687_0    defaults
decorator                 4.4.0                    py37_1    defaults
defusedxml                0.5.0                    py37_1    defaults
distributed               1.26.0                   py37_1    defaults
docutils                  0.14                     py37_0    defaults
entrypoints               0.3                      py37_0    defaults
et_xmlfile                1.0.1                    py37_0    defaults
expat                     2.2.6                h0a44026_0    defaults
fastcache                 1.0.2            py37h1de35cc_2    defaults
filelock                  3.0.10                   py37_0    defaults
flask                     1.0.2                    py37_1    defaults
freetype                  2.9.1                hb4e5f40_0    defaults
get_terminal_size         1.0.0                h7520d66_0    defaults
gettext                   0.19.8.1             h15daf44_3    defaults
gevent                    1.4.0            py37h1de35cc_0    defaults
glib                      2.56.2               hd9629dc_0    defaults
glob2                     0.6                      py37_1    defaults
gmp                       6.1.2                hb37e062_1    defaults
gmpy2                     2.0.8            py37h6ef4df4_2    defaults
greenlet                  0.4.15           py37h1de35cc_0    defaults
h5py                      2.9.0            py37h3134771_0    defaults
hdf5                      1.10.4               hfa1e0ec_0    defaults
heapdict                  1.0.0                    py37_2    defaults
holoviews                 1.12.3                     py_0    pyviz
html5lib                  1.0.1                    py37_0    defaults
icu                       58.2                 h4b95b61_1    defaults
idna                      2.8                      py37_0    defaults
imageio                   2.5.0                    py37_0    defaults
imagesize                 1.1.0                    py37_0    defaults
importlib_metadata        0.8                      py37_0    defaults
intel-openmp              2019.3                      199    defaults
ipykernel                 5.1.0            py37h39e3cac_0    defaults
ipython                   7.4.0            py37h39e3cac_0    defaults
ipython_genutils          0.2.0                    py37_0    defaults
ipywidgets                7.4.2                    py37_0    defaults
isort                     4.3.16                   py37_0    defaults
itsdangerous              1.1.0                    py37_0    defaults
jbig                      2.1                  h4d881f8_0    defaults
jdcal                     1.4                      py37_0    defaults
jedi                      0.13.3                   py37_0    defaults
jinja2                    2.10                     py37_0    defaults
jpeg                      9b                   he5867d9_2    defaults
jsonschema                3.0.1                    py37_0    defaults
jupyter                   1.0.0                    py37_7    defaults
jupyter_client            5.2.4                    py37_0    defaults
jupyter_console           6.0.0                    py37_0    defaults
jupyter_core              4.4.0                    py37_0    defaults
jupyterlab                0.35.4           py37hf63ae98_0    defaults
jupyterlab_server         0.2.0                    py37_0    defaults
keyring                   18.0.0                   py37_0    defaults
kiwisolver                1.0.1            py37h0a44026_0    defaults
krb5                      1.16.1               hddcf347_7    defaults
lazy-object-proxy         1.3.1            py37h1de35cc_2    defaults
libarchive                3.3.3                h786848e_5    defaults
libcurl                   7.64.0               h051b688_2    defaults
libcxx                    4.0.1                hcfea43d_1    defaults
libcxxabi                 4.0.1                hcfea43d_1    defaults
libedit                   3.1.20181209         hb402a30_0    defaults
libffi                    3.2.1                h475c297_4    defaults
libgfortran               3.0.1                h93005f0_2    defaults
libiconv                  1.15                 hdd342a3_7    defaults
liblief                   0.9.0                h2a1bed3_2    defaults
libpng                    1.6.36               ha441bb4_0    defaults
libsodium                 1.0.16               h3efe00b_0    defaults
libssh2                   1.8.0                ha12b0ac_4    defaults
libtiff                   4.0.10               hcb84e12_2    defaults
libxml2                   2.9.9                hab757c2_0    defaults
libxslt                   1.1.33               h33a18ac_0    defaults
llvmlite                  0.28.0           py37h8c7ce04_0    defaults
locket                    0.2.0                    py37_1    defaults
lxml                      4.3.2            py37hef8c89e_0    defaults
lz4-c                     1.8.1.2              h1de35cc_0    defaults
lzo                       2.10                 h362108e_2    defaults
markdown                  3.1.1                    py37_0    defaults
markupsafe                1.1.1            py37h1de35cc_0    defaults
matplotlib                3.0.3            py37h54f8f79_0    defaults
mccabe                    0.6.1                    py37_1    defaults
mistune                   0.8.4            py37h1de35cc_0    defaults
mkl                       2019.3                      199    defaults
mkl-service               1.1.2            py37hfbe908c_5    defaults
mkl_fft                   1.0.10           py37h5e564d8_0    defaults
mkl_random                1.0.2            py37h27c97d8_0    defaults
more-itertools            6.0.0                    py37_0    defaults
mpc                       1.1.0                h6ef4df4_1    defaults
mpfr                      4.0.1                h3018a27_3    defaults
mpmath                    1.1.0                    py37_0    defaults
msgpack-python            0.6.1            py37h04f5b5a_1    defaults
multipledispatch          0.6.0                    py37_0    defaults
nbconvert                 5.4.1                    py37_3    defaults
nbformat                  4.4.0                    py37_0    defaults
ncurses                   6.1                  h0a44026_1    defaults
networkx                  2.2                      py37_1    defaults
nltk                      3.4                      py37_1    defaults
nose                      1.3.7                    py37_2    defaults
notebook                  5.7.8                    py37_0    defaults
numba                     0.43.1           py37h6440ff4_0    defaults
numexpr                   2.6.9            py37h7413580_0    defaults
numpy                     1.16.2           py37hacdab7b_0    defaults
numpy-base                1.16.2           py37h6575580_0    defaults
numpydoc                  0.8.0                    py37_0    defaults
olefile                   0.46                     py37_0    defaults
openpyxl                  2.6.1                    py37_1    defaults
openssl                   1.1.1c               h1de35cc_1    defaults
packaging                 19.0                     py37_0    defaults
pandas                    0.24.2           py37h0a44026_0    defaults
pandoc                    2.2.3.2                       0    defaults
pandocfilters             1.4.2                    py37_1    defaults
panel                     0.6.0                      py_0    pyviz
param                     1.9.1                      py_0    pyviz
parso                     0.3.4                    py37_0    defaults
partd                     0.3.10                   py37_1    defaults
path.py                   11.5.0                   py37_0    defaults
pathlib2                  2.3.3                    py37_0    defaults
patsy                     0.5.1                    py37_0    defaults
pcre                      8.43                 h0a44026_0    defaults
pep8                      1.7.1                    py37_0    defaults
pexpect                   4.6.0                    py37_0    defaults
pickleshare               0.7.5                    py37_0    defaults
pillow                    5.4.1            py37hb68e598_0    defaults
pip                       19.0.3                   py37_0    defaults
pkginfo                   1.5.0.1                  py37_0    defaults
pluggy                    0.9.0                    py37_0    defaults
ply                       3.11                     py37_0    defaults
prometheus_client         0.6.0                    py37_0    defaults
prompt_toolkit            2.0.9                    py37_0    defaults
psutil                    5.6.1            py37h1de35cc_0    defaults
ptyprocess                0.6.0                    py37_0    defaults
py                        1.8.0                    py37_0    defaults
py-lief                   0.9.0            py37h1413db1_2    defaults
pycodestyle               2.5.0                    py37_0    defaults
pycosat                   0.6.3            py37h1de35cc_0    defaults
pycparser                 2.19                     py37_0    defaults
pycrypto                  2.6.1            py37h1de35cc_9    defaults
pyct                      0.4.6                      py_0    pyviz
pyct-core                 0.4.6                      py_0    pyviz
pycurl                    7.43.0.2         py37ha12b0ac_0    defaults
pyflakes                  2.1.1                    py37_0    defaults
pygments                  2.3.1                    py37_0    defaults
pylint                    2.3.1                    py37_0    defaults
pyodbc                    4.0.26           py37h0a44026_0    defaults
pyopenssl                 19.0.0                   py37_0    defaults
pyparsing                 2.3.1                    py37_0    defaults
pyqt                      5.9.2            py37h655552a_2    defaults
pyrsistent                0.14.11          py37h1de35cc_0    defaults
pysocks                   1.6.8                    py37_0    defaults
pytables                  3.5.1            py37h5bccee9_0    defaults
pytest                    4.3.1                    py37_0    defaults
pytest-arraydiff          0.3              py37h39e3cac_0    defaults
pytest-astropy            0.5.0                    py37_0    defaults
pytest-doctestplus        0.3.0                    py37_0    defaults
pytest-openfiles          0.3.2                    py37_0    defaults
pytest-remotedata         0.3.1                    py37_0    defaults
python                    3.7.3                h359304d_0    defaults
python-dateutil           2.8.0                    py37_0    defaults
python-libarchive-c       2.8                      py37_6    defaults
python.app                2                        py37_9    defaults
pytz                      2018.9                   py37_0    defaults
pyviz_comms               0.7.2                      py_0    pyviz
pywavelets                1.0.2            py37h1d22016_0    defaults
pyyaml                    5.1              py37h1de35cc_0    defaults
pyzmq                     18.0.0           py37h0a44026_0    defaults
qt                        5.9.7                h468cd18_1    defaults
qtawesome                 0.5.7                    py37_1    defaults
qtconsole                 4.4.3                    py37_0    defaults
qtpy                      1.7.0                    py37_1    defaults
readline                  7.0                  h1de35cc_5    defaults
requests                  2.21.0                   py37_0    defaults
rope                      0.12.0                   py37_0    defaults
ruamel_yaml               0.15.46          py37h1de35cc_0    defaults
scikit-image              0.14.2           py37h0a44026_0    defaults
scikit-learn              0.20.3           py37h27c97d8_0    defaults
scipy                     1.2.1            py37h1410ff5_0    defaults
seaborn                   0.9.0                    py37_0    defaults
send2trash                1.5.0                    py37_0    defaults
setuptools                40.8.0                   py37_0    defaults
simplegeneric             0.8.1                    py37_2    defaults
singledispatch            3.4.0.3                  py37_0    defaults
sip                       4.19.8           py37h0a44026_0    defaults
six                       1.12.0                   py37_0    defaults
snappy                    1.1.7                he62c110_3    defaults
snowballstemmer           1.2.1                    py37_0    defaults
sortedcollections         1.1.2                    py37_0    defaults
sortedcontainers          2.1.0                    py37_0    defaults
soupsieve                 1.8                      py37_0    defaults
sphinx                    1.8.5                    py37_0    defaults
sphinxcontrib             1.0                      py37_1    defaults
sphinxcontrib-websupport  1.1.0                    py37_1    defaults
spyder                    3.3.3                    py37_0    defaults
spyder-kernels            0.4.2                    py37_0    defaults
sqlalchemy                1.3.1            py37h1de35cc_0    defaults
sqlite                    3.27.2               ha441bb4_0    defaults
statsmodels               0.9.0            py37h1d22016_0    defaults
sympy                     1.3                      py37_0    defaults
tblib                     1.3.2                    py37_0    defaults
terminado                 0.8.1                    py37_1    defaults
testpath                  0.4.2                    py37_0    defaults
tk                        8.6.8                ha441bb4_0    defaults
toolz                     0.9.0                    py37_0    defaults
tornado                   6.0.2            py37h1de35cc_0    defaults
tqdm                      4.31.1                   py37_1    defaults
traitlets                 4.3.2                    py37_0    defaults
unicodecsv                0.14.1                   py37_0    defaults
unixodbc                  2.3.7                h1de35cc_0    defaults
urllib3                   1.24.1                   py37_0    defaults
wcwidth                   0.1.7                    py37_0    defaults
webencodings              0.5.1                    py37_1    defaults
werkzeug                  0.14.1                   py37_0    defaults
wheel                     0.33.1                   py37_0    defaults
widgetsnbextension        3.4.2                    py37_0    defaults
wrapt                     1.11.1           py37h1de35cc_0    defaults
wurlitzer                 1.0.2                    py37_0    defaults
xlrd                      1.2.0                    py37_0    defaults
xlsxwriter                1.1.5                    py37_0    defaults
xlwings                   0.15.4                   py37_0    defaults
xlwt                      1.3.0                    py37_0    defaults
xz                        5.2.4                h1de35cc_4    defaults
yaml                      0.1.7                hc338f04_2    defaults
zeromq                    4.3.1                h0a44026_3    defaults
zict                      0.1.4                    py37_0    defaults
zipp                      0.3.3                    py37_1    defaults
zlib                      1.2.11               h1de35cc_3    defaults
zstd                      1.3.7                h5bba6e5_0    defaults
@amber2018
Copy link

Same issue here.
I installed the latest Anaconda3-2019.07-Linux-x86_64.sh
Operating System: Ubuntu 18.04

@rkiwanuka
Copy link

Same issue here. I installed Anaconda3-2019.10-Linux-x86_64.sh. Operating system Ubuntu 18.04. Any ideas what is causing this problem?

@onedealcc
Copy link

Same issue here. Ubuntu 18.04
(latest Anaconda package as of Jan 2020)

@Anna-cell
Copy link

Same issue here on Ubuntu 18.08.4 LTS.
I just updated anaconda and anaconda-navigator too, the error is still here.

@hemangjoshi37a
Copy link

Has anyone found any solution yet??

@cactus1549
Copy link

cactus1549 commented Apr 21, 2020

Same here. Linux Mint 19.3 Mate environment

conda info

 active environment : base
 active env location : /home/sacha/anaconda3
 shell level : 1
 user config file : /home/sacha/.condarc
 populated config files : /home/sacha/.condarc
 conda version : 4.8.3
 conda-build version : 3.18.11
     python version : 3.7.6.final.0
     virtual packages : __cuda=10.1
                      __glibc=2.27
   base environment : /home/sacha/anaconda3  (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 : /home/sacha/anaconda3/pkgs
                      /home/sacha/.conda/pkgs
   envs directories : /home/sacha/anaconda3/envs
                      /home/sacha/.conda/envs
           platform : linux-64
         user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.6 Linux/5.3.0-46-generic linuxmint/19.3 glibc/2.27
            UID:GID : 1000:1000
         netrc file : None
       offline mode : False

(base) sacha@sacha-MSI7:~$ Traceback (most recent call last):
File "/home/sacha/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 455, in _conda_info_processed
processed_info = self._process_conda_info(info)
File "/home/sacha/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 566, in _process_conda_info
processed_info = info.copy()
AttributeError: 'bytes' object has no attribute 'copy'

@khairmuhammad
Copy link

i have also same issue... any solution??

@johnrobyclayton
Copy link

Line 566 of
~/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py is:
processed_info = info

I replaced it with:
if isinstance(info,bytes):
processed_info = info
else:
processed_info = info.copy()

and this prevents the error message from appearing.

A better solution would be to generalise this ensuring that the copy method exists for the object or if the object is a fundamental datatype.

And then surround the whole thing with a try catch to capture and handle any errors.
If it is a

@OrielBanne
Copy link

i have the same issue....

@spsingh559
Copy link

After updating the conda package, the issue has been resolved for me.

$ conda update conda
$ conda update anaconda-navigator
$ conda update navigator-updater

@vsiegel
Copy link

vsiegel commented Oct 23, 2020

$ conda update conda
$ conda update anaconda-navigator
$ conda update navigator-updater

I can confirm that this solved the problem on my Ubuntu 20.04 with anaconda-navigator 1.9.12-py38_0.

@liamreneroy
Copy link

Didn't solve the problem for me. Is anyone else still having the issue after trying the updates specified by spsingh559

I'm on Ubuntu 18.04

@ny2292000
Copy link

I also have that problem with Ubuntu 20.04
Python 3.8.5
conda 4.10.1
anaconda-navigator 1.10.0

@JoTrab
Copy link

JoTrab commented Jun 10, 2021

Same here with:
ubuntu 20.04
conda 4.10.1
python 3.8.3
anaconda-navigator 2.0.3

@User201688
Copy link

Same issue with windows 10

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

No branches or pull requests