Conda: Error when use 'conda update anaconda'

Created on 9 Oct 2017  路  3Comments  路  Source: conda/conda

As what it asks me.

Gabriels-MBP:~ gabrielfeng$ conda upgrade --all
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.27
   conda is private : False
  conda-env version : 4.3.27
conda-build version : 3.0.22
     python version : 3.6.2.final.0
   requests version : 2.18.4
   root environment : /Users/gabrielfeng/anaconda3  (writable)
default environment : /Users/gabrielfeng/anaconda3
   envs directories : /Users/gabrielfeng/anaconda3/envs
                      /Users/gabrielfeng/.conda/envs
      package cache : /Users/gabrielfeng/anaconda3/pkgs
                      /Users/gabrielfeng/.conda/pkgs
       channel URLs : https://conda.anaconda.org/anaconda-fusion/osx-64
                      https://conda.anaconda.org/anaconda-fusion/noarch
                      https://repo.continuum.io/pkgs/main/osx-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/osx-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/osx-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/osx-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : /Users/gabrielfeng/.condarc
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.27 requests/2.18.4 CPython/3.6.2 Darwin/17.0.0 OSX/10.13
            UID:GID : 501:20

$ /Users/gabrielfeng/anaconda3/bin/conda upgrade --all

Traceback (most recent call last):
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 140, in _main
    exit_code = args.func(args, p)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/cli/main_update.py", line 65, in execute
    install(args, parser, 'update')
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 160, in install
    linked_dists = install_linked(prefix)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 123, in linked
    return set(linked_data(prefix, ignore_channels=ignore_channels).keys())
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 115, in linked_data
    load_linked_data(prefix, dist_name, ignore_channels=ignore_channels)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 68, in load_linked_data
    linked_data_[prefix][dist] = rec = IndexRecord(**rec)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 702, in __call__
    instance = super(EntityType, cls).__call__(*args, **kwargs)
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 719, in __init__
    setattr(self, key, kwargs[key])
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 424, in __set__
    instance.__dict__[self.name] = self.validate(instance, self.box(instance, val))
  File "/Users/gabrielfeng/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 465, in validate
    raise ValidationError(getattr(self, 'name', 'undefined name'), val)
conda._vendor.auxlib.exceptions.ValidationError: Invalid value 1506080276.026 for timestamp

Most helpful comment

Moderator Edit: Please do not use the solution below, which deletes files. Instead, see solution in #6096.


Closing as duplicate of #6096

Basically, you need to delete the files which have timestamp in floating point.

@paul-nelson-baker You can try running:

grep -l '"timestamp": [0-9]\+\.'  /usr/local/anaconda3/conda-meta/*.json | xargs rm -f

@Gabrielvon You can try running:

grep -l '"timestamp": [0-9]\+\.'  /Users/gabrielfeng/anaconda3/conda-meta/*.json | xargs rm -f

@gws-dnrc You can try running:

findstr /s /m /i /r /c:"timestamp\": [0-9]*\." C:\Users\gsmith\Anaconda2\conda-meta\*.json

...and use del to delete those files only.

All 3 comments

Same thing here when I did an upgrade

(C:\Users\gsmith\Anaconda2) C:\Users\gsmith>conda update anaconda
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.27
   conda is private : False
  conda-env version : 4.3.27
conda-build version : not installed
     python version : 2.7.13.final.0
   requests version : 2.12.4
   root environment : C:\Users\gsmith\Anaconda2  (writable)
default environment : C:\Users\gsmith\Anaconda2
   envs directories : C:\Users\gsmith\Anaconda2\envs
                      C:\Users\gsmith\AppData\Local\conda\conda\envs
                      C:\Users\gsmith\.conda\envs
      package cache : C:\Users\gsmith\Anaconda2\pkgs
                      C:\Users\gsmith\AppData\Local\conda\conda\pkgs
       channel URLs : https://repo.continuum.io/pkgs/main/win-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/win-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/win-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/win-64
                      https://repo.continuum.io/pkgs/pro/noarch
                      https://repo.continuum.io/pkgs/msys2/win-64
                      https://repo.continuum.io/pkgs/msys2/noarch
        config file : None
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.27 requests/2.12.4 CPython/2.7.13 Windows/7

Windows/6.1.7601
administrator : False

$ C:\Users\gsmith\Anaconda2\Scripts\conda update anaconda

Traceback (most recent call last):
  File "C:\Users\gsmith\Anaconda2\lib\site-packages\conda\exceptions.py", li

ne 640, in conda_exception_handler
return_value = func(args, kwargs)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\cli\main.py", line
140, in _main
exit_code = args.func(args, p)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\cli\main_update.py
", line 65, in execute
install(args, parser, 'update')
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\cli\install.py", l
ine 160, in install
linked_dists = install_linked(prefix)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\core\linked_data.p
y", line 123, in linked
return set(linked_data(prefix, ignore_channels=ignore_channels).keys())
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\core\linked_data.p
y", line 115, in linked_data
load_linked_data(prefix, dist_name, ignore_channels=ignore_channels)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda\core\linked_data.p
y", line 68, in load_linked_data
linked_data_[prefix][dist] = rec = IndexRecord(
rec)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda_vendor\auxlib\ent
ity.py", line 702, in __call__
instance = super(EntityType, cls).__call__(
args, **kwargs)
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda_vendor\auxlib\ent
ity.py", line 719, in __init__
setattr(self, key, kwargs[key])
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda_vendor\auxlib\ent
ity.py", line 424, in __set__
instance.__dict__[self.name] = self.validate(instance, self.box(instance
, val))
File "C:\Users\gsmith\Anaconda2lib\site-packages\conda_vendor\auxlib\ent
ity.py", line 465, in validate
raise ValidationError(getattr(self, 'name', 'undefined name'), val)
ValidationError: Invalid value 1506081004.8 for timestamp

(C:\Users\gsmith\Anaconda2) C:\Users\gsmith>

I too am experiencing this issue.

Current conda install:

               platform : osx-64
          conda version : 4.3.27
       conda is private : False
      conda-env version : 4.3.27
    conda-build version : not installed
         python version : 3.6.2.final.0
       requests version : 2.18.4
       root environment : /usr/local/anaconda3  (writable)
    default environment : /usr/local/anaconda3
       envs directories : /usr/local/anaconda3/envs
                          /Users/paul.baker/.conda/envs
          package cache : /usr/local/anaconda3/pkgs
                          /Users/paul.baker/.conda/pkgs
           channel URLs : https://repo.continuum.io/pkgs/main/osx-64
                          https://repo.continuum.io/pkgs/main/noarch
                          https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : None
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.27 requests/2.18.4 CPython/3.6.2 Darwin/16.7.0 OSX/10.12.6
                UID:GID : 501:20


`$ /usr/local/anaconda3/bin/conda upgrade conda -y`

    Traceback (most recent call last):
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
        return_value = func(*args, **kwargs)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 140, in _main
        exit_code = args.func(args, p)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/cli/main_update.py", line 65, in execute
        install(args, parser, 'update')
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 160, in install
        linked_dists = install_linked(prefix)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 123, in linked
        return set(linked_data(prefix, ignore_channels=ignore_channels).keys())
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 115, in linked_data
        load_linked_data(prefix, dist_name, ignore_channels=ignore_channels)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/core/linked_data.py", line 68, in load_linked_data
        linked_data_[prefix][dist] = rec = IndexRecord(**rec)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 702, in __call__
        instance = super(EntityType, cls).__call__(*args, **kwargs)
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 719, in __init__
        setattr(self, key, kwargs[key])
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 424, in __set__
        instance.__dict__[self.name] = self.validate(instance, self.box(instance, val))
      File "/usr/local/anaconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 465, in validate
        raise ValidationError(getattr(self, 'name', 'undefined name'), val)
    conda._vendor.auxlib.exceptions.ValidationError: Invalid value 1506080276.026 for timestamp

Moderator Edit: Please do not use the solution below, which deletes files. Instead, see solution in #6096.


Closing as duplicate of #6096

Basically, you need to delete the files which have timestamp in floating point.

@paul-nelson-baker You can try running:

grep -l '"timestamp": [0-9]\+\.'  /usr/local/anaconda3/conda-meta/*.json | xargs rm -f

@Gabrielvon You can try running:

grep -l '"timestamp": [0-9]\+\.'  /Users/gabrielfeng/anaconda3/conda-meta/*.json | xargs rm -f

@gws-dnrc You can try running:

findstr /s /m /i /r /c:"timestamp\": [0-9]*\." C:\Users\gsmith\Anaconda2\conda-meta\*.json

...and use del to delete those files only.

Was this page helpful?
0 / 5 - 0 ratings