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

--upgrade fails #263

Closed
cmbant opened this issue Sep 23, 2022 · 2 comments
Closed

--upgrade fails #263

cmbant opened this issue Sep 23, 2022 · 2 comments

Comments

@cmbant
Copy link
Collaborator

cmbant commented Sep 23, 2022

Copying last comment from #237:

Upgrading old versions I think can fail because this raises an error (old installs don't have .dat files):


            elif opts.get("github_release"):
                try:
                    with open(os.path.join(path, _version_filename), "r") as f:
                        installed_version = version.parse(f.readlines()[0])
                except FileNotFoundError:  # old install: no version file
                    raise VersionCheckError("Could not read current version.")

Trace

`(base) [aml1005@login-e-13 cobaya]$ cobaya-install --upgrade planck_2018_lowl.EE
[install] Installing external packages at '/home/aml1005/git/cobaya/modules'
[install] The installation path has been written into the global config file: /home/aml1005/.config/cobaya/config.yaml

================================================================================
planck_2018_lowl.EE

[install] Checking if dependencies have already been installed...
[install] Version check failed: Could not read current version.
[install] Installing...
[clik] clik module loaded successfully from /rds/user/aml1005/hpc-work/modules/code/planck/code/plc_3.0/plc-3.01/lib/python/site-packages/clik
Traceback (most recent call last):
File "/home/aml1005/git/cobaya/cobaya/likelihoods/base_classes/InstallableLikelihood.py", line 98, in is_installed
with open(os.path.join(path, _version_filename), "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/rds/user/aml1005/hpc-work/modules/data/planck_supp_data_and_covmats/version.dat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/aml1005/git/cobaya/cobaya/install.py", line 215, in install
success = install_this(path=general_abspath, **kwargs_install)
File "/home/aml1005/git/cobaya/cobaya/likelihoods/base_classes/planck_clik.py", line 207, in install
if force or not cls.is_installed(path=path, code=False, data=True):
File "/home/aml1005/git/cobaya/cobaya/likelihoods/base_classes/planck_clik.py", line 171, in is_installed
result &= native.is_installed(**kwargs)
File "/home/aml1005/git/cobaya/cobaya/likelihoods/base_classes/InstallableLikelihood.py", line 101, in is_installed
raise VersionCheckError("Could not read current version.")
cobaya.tools.VersionCheckError: Could not read current version.
[install] ERROR An unknown error occurred. Delete the external packages folder '/home/aml1005/git/cobaya/modules' and try again. Please, notify the developers if this error persists.
[install] ERROR Installation failed! Look at the error messages above. Solve them and try again, or, if you are unable to solve them, install the packages required by this component manually.

================================================================================

  • Summary *
    ================================================================================

[install] ERROR The installation (or installation test) of some component(s) has failed:

  • likelihood:planck_2018_lowl.EE
    Check output of the installer of each component above for precise error info.

[exception handler] ---------------------------------------

Traceback (most recent call last):
File "/rds/user/aml1005/hpc-work/anaconda2/bin/cobaya-install", line 11, in
load_entry_point('cobaya', 'console_scripts', 'cobaya-install')()
File "/home/aml1005/git/cobaya/cobaya/install.py", line 549, in install_script
"no_set_global", "skip", "skip_global", "debug", "upgrade"]})
File "/home/aml1005/git/cobaya/cobaya/install.py", line 278, in install
bullet + bullet.join(failed_components))
cobaya.log.LoggedError: The installation (or installation test) of some component(s) has failed:

  • likelihood:planck_2018_lowl.EE
    Check output of the installer of each component above for precise error info.

`

@cmbant
Copy link
Collaborator Author

cmbant commented Sep 23, 2022

(base) [aml1005@login-e-15 cobaya]$ cobaya-install bao.sixdf_2011_bao --upgrade
[install] Installing external packages at '/home/aml1005/git/cobaya/modules'
[install] The installation path has been written into the global config file: /home/aml1005/.config/cobaya/config.yaml

================================================================================
bao.sixdf_2011_bao
================================================================================

[install] Checking if dependencies have already been installed...
[install] Version check failed: Could not read current version.
[install] Installing...
[bao.sixdf_2011_bao] Downloading CobayaSampler/bao_data data...
10.6MiB [00:02, 5.34MiB/s]
[bao.sixdf_2011_bao] Downloaded filename bao_data-2.0.tar.gz
[bao.sixdf_2011_bao] bao_data v2.0 downloaded and decompressed correctly.
[install] Successfully installed! Let's check it...
[install] Installation check successful.

================================================================================
* Summary *
================================================================================

[install] *ERROR* The following packages are obsolete. Re-run with `--upgrade` option (not upgrading by default to preserve possible user changes):
 - likelihood:bao.sixdf_2011_bao
[exception handler] ---------------------------------------

Traceback (most recent call last):
  File "/rds/user/aml1005/hpc-work/anaconda2/bin/cobaya-install", line 11, in <module>
    load_entry_point('cobaya', 'console_scripts', 'cobaya-install')()
  File "/home/aml1005/git/cobaya/cobaya/install.py", line 549, in install_script
    "no_set_global", "skip", "skip_global", "debug", "upgrade"]})
  File "/home/aml1005/git/cobaya/cobaya/install.py", line 283, in install
    bullet + bullet.join(obsolete_components))
cobaya.log.LoggedError: The following packages are obsolete. Re-run with `--upgrade` option (not upgrading by default to preserve possible user changes):
 - likelihood:bao.sixdf_2011_bao
-------------------------------------------------------------


@cmbant
Copy link
Collaborator Author

cmbant commented Nov 2, 2022

e0c2d29

@cmbant cmbant closed this as completed Nov 2, 2022
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

1 participant