module 'clik' has no attribute 'clik'

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Pasquale Caterino
Posts: 1
Joined: November 21 2021
Affiliation: University of Naples Federico II

module 'clik' has no attribute 'clik'

Post by Pasquale Caterino » November 21 2021

Hi everyone, i am an new user and i recently tried to install cobaya but i am facing an issue and i don't know how to solve it.
i generated a simple yaml file with the cosmo-generator provided but when i try cobaya-run pl.yaml i get:
I also have a previous installation of Class that i want to use since it cointains few modifications in the background.c file (this should explain the message "defaulting to global).
does anyone know how can i solve this issue?

Code: Select all

[output] Output to be read-from/written-into folder '.', with prefix 'pl'
[prior] *WARNING* External prior 'SZ' loaded. Mind that it might not be normalized!
[classy] Importing *auto-installed* CLASS (but defaulting to *global*).
[classy] Initialized!
[clik] Importing *auto-installed* clik (but defaulting to *global*).
Cannot use clik wrapper (cause = 'libcfitsio.so.8: cannot open shared object file: No such file or directory')
Cannot use clik_lensing wrapper (cause = 'libcfitsio.so.8: cannot open shared object file: No such file or directory')
[exception handler] ---------------------------------------

Traceback (most recent call last):
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/likelihoods/base_classes/planck_clik.py", line 70, in initialize
    else clik.clik(self.clik_file)
AttributeError: module 'clik' has no attribute 'clik'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pasquale/anaconda3/bin/cobaya-run", line 8, in <module>
    sys.exit(run_script())
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/run.py", line 216, in run_script
    run(info, **arguments.__dict__)
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/run.py", line 134, in run
    with Model(updated_info["params"], updated_info["likelihood"],
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/model.py", line 152, in __init__
    self.likelihood = LikelihoodCollection(info_likelihood, theory=self.theory,
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/likelihood.py", line 298, in __init__
    self.add_instance(name, like_class(info, packages_path=packages_path,
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/likelihood.py", line 90, in __init__
    super().__init__(info, name=name, timing=timing,
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/theory.py", line 65, in __init__
    super().__init__(info, name=name, timing=timing,
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/component.py", line 95, in __init__
    self.initialize()
  File "/home/pasquale/anaconda3/lib/python3.8/site-packages/cobaya/likelihoods/base_classes/planck_clik.py", line 71, in initialize
    except clik.lkl.CError:
AttributeError: module 'clik' has no attribute 'lkl'
-------------------------------------------------------------

Antony Lewis
Posts: 1936
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: module 'clik' has no attribute 'clik'

Post by Antony Lewis » November 22 2021

Looks like a problem with the cfitsio installation. Check clik runs OK independently of Cobaya.

Post Reply