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

Add FAQ about config file errors #306

Open
pmaxted opened this issue Sep 25, 2023 · 0 comments
Open

Add FAQ about config file errors #306

pmaxted opened this issue Sep 25, 2023 · 0 comments

Comments

@pmaxted
Copy link
Owner

pmaxted commented Sep 25, 2023

In [1]: from pycheops.core import setup_config
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File /opt/anaconda3/envs/cheops/lib/python3.9/site-packages/pycheops/__init__.py:55
     54 try:
---> 55     psf_path = path.join(data_path, config['psf_file']['psf_file'])
     56 except KeyError:

File /opt/anaconda3/envs/cheops/lib/python3.9/configparser.py:963, in RawConfigParser.__getitem__(self, key)
    962 if key != self.default_section and not self.has_section(key):
--> 963     raise KeyError(key)
    964 return self._proxies[key]

KeyError: 'psf_file'

During handling of the above exception, another exception occurred:

KeyError                                  Traceback (most recent call last)
Cell In[1], line 1
----> 1 from pycheops.core import setup_config

File /opt/anaconda3/envs/cheops/lib/python3.9/site-packages/pycheops/__init__.py:57
     55     psf_path = path.join(data_path, config['psf_file']['psf_file'])
     56 except KeyError:
---> 57     raise KeyError("Run pycheops.core.setup_config(overwrite=True) to"
     58                    " update your config file.")
     59 if not path.isfile(pfile) or (path.getmtime(pfile) < path.getmtime(psf_path)):
     60     radius = 33  # Aperture radius in pixels

KeyError: 'Run pycheops.core.setup_config(overwrite=True) to update your config file.'


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