Skip to content

Troubleshooting

Don Horner edited this page Oct 25, 2022 · 51 revisions

Please check below for solutions to common problems and known bugs. We've tried to arrange them into logical categories, but you may want to search the page to look for something specific.

You should also check that you have the latest release of the tools (you can do this by running conda list fermi). It's possible the problem may already have been fixed. See the Release Notes for the changes in each version.

If you still can't find a solution, please see Error Reporting.

Python Setup

  • Make sure that Anaconda or Miniconda Python is the python you are using (you can verify this via the which python command)/verify that your Anaconda or Miniconda installation is in your PATH.
  • In order to use Jupyter Notebooks you will need to install the nb_conda package via conda install, i.e., conda install nb_conda

Activating Conda

  • Activation using tcsh or csh fails with an error like "root: Command not found."
    You may need to downgrade conda or switch to the bash shell. Conda has poor support for csh/tcsh and has broken the activation script several times during upgrades, which causes problems because paths and other things not getting set correctly. For instance, the 4.6.14 version of conda made various changes to the activation script, especially for Windows, that broke the (t)csh activation. We can sometimes fix these issue in our activation script, so please report the issue. As a workaround and if you don't want to use the bash shell, you can also try downgrading conda:

    • Deactivate any conda environments.
    • Run conda install conda=4.6.12 (or whatever the latest version that worked).
    • Start a fresh shell or log back out and in again to make sure environment is reset.
    • Activate conda.
  • Activation fails with an error like :] Event not found."
    We have found that custom command prompts that contain terms like [\!] cause the activation to fail in the latest conda version (4.5), at least in csh. Escaping the final bracket, e.g., [\!\], seems to fix the problem. We have filed an error report with the Conda developers.

  • You receive a warning like:
    WARNING: You have LD_LIBRARY_PATH set. This might interfere with the correct functioning of conda and the Fermi ST
    or
    WARNING: You have PYTHONPATH set. This might interfere with the correct functioning of conda and the Fermi ST
    Having the PYTHONPATH or LD_LIBRARY_PATH set will likely not interfere with the tools. If you encounter a problem with the tools after seeing this warning on setup, try rerunning the problem command with these variables unset.

  • You receive the message cat: EOF: No such file or directory
    This message can happen when activating the tools in csh/tcsh environments. It is a known issue with the csh activation script of the tools and is currently being patched. This should not affect tool functionality.

Installation Issues

  • The dependency resolution (the "solving environment" step) seems to stall (i.e., takes more than a few minutes) or never finishes.
    This generally indicates that conda is having problems figuring out the all the dependencies of the Fermitools (and the dependencies of those dependencies, etc.). This is called a satisfiability problem. It's trying to account for things like channel priority, version differences, build number, and timestamp. There can be several solutions to the problem.
    • Try updating your version of conda and rerunning the installation. It may have implemented an improved solver. It should tell you at the start of the install that a newer version is available (WARNING: A newer version of conda exists) and how to install it.
    • Give conda extra information to reduce the scope of the problem. For example, add python=3 to the installation command after fermitools. i.e. conda install -c conda-forge -c fermi fermitools python=3 to get a Fermitools 2.0 or later version. Check the latest Install Instructions which may have been updated to include some of these.
    • Try using the mamba installer. Mamba is a reimplementation of the conda package manager in C++ and is generally faster at resolving the dependencies. You can install it with the conda command conda install mamba -c conda-forge and then use it in place of the conda command (e.g., 'mamba install' instead of 'conda install').
  • The dependency resolution (the "solving environment" step) fails with
       Found conflicts! Looking for incompatible packages.
       This can take several minutes.  Press CTRL-C to abort.
       failed                                                                                                                           
       UnsatisfiableError: 
       Note that strict channel priority may have removed packages required for satisfiability.
    
    This can mean that strict channel priority is set in your .condarc file. The Fermitools do not yet work with strict channel priority set. You can turn it off by running the command conda config --set channel_priority false.
  • You get ImportError: libgsl.so.25: cannot open shared object file: No such file or directory when trying to run the tools.
    This happens when the library is taken from the wrong channel. We haven't fully determined the cause of the problem. There may be something in your .condarc that is overriding the channels specified during installation. You can try adding --override-channels to the install command. See this issue for more.

Pulsar Tools

  • You get the message that the pulsar tools, like gtpsearch or gtpspec, are not found or installed. That is because many of the pulsar tools have been deprecated and removed from the Fermitools. They were not being used by the pulsar community and have not really had anyone to support them for a while. The pulsar community instead uses tools like tempo2 or PRESTO. Please look into using those tools for pulsar analysis.

ModelEditor

  • If ModelEditor fails to launch, make sure that you have the pyDS9 package installed via conda. For instructions on how to do this see the Additional Software section of the Installation Instructions.

gtburst

  • If gtburst is throwing the error OSError: [Errno 2] No such file or directory: '~/.gtburst/gtburstGUI.conf': Check the ~/.gtburst directory for a file named gtburstGUI.conf.db. Copying this file to ~/.gtburst/gtburstGUI.conf seems to fix the issue
  • If the gtburst GUI doesn't launch sometimes you need to manually perform an update. Do the following in python:
       >>> from GtBurst import updater
       >>> updater.update()
    
  • If you get an error like <path>/envs/fermi/lib/tcl8.6/init.tcl: version conflict for package "Tcl": have 8.6.6, need exactly 8.6.12, the workaround is to edit the init.cl file to change the package require line to the version it says you have. You could also just comment this line out. If you try again, it will probably complain about the Tk version in the tk.tcl file. You'll need to make the same edit to that file.

Other Messages or Errors

Caught St13runtime_error at the top level: RoiCuts::sortCuts:

This error occurs when a tool such as gtexpmap finds duplicate DSS keywords in the FITS header, so you must delete one of the duplicated keywords. After that you must change the keyword NDSKEYS to reflect the surviving number of DSS keywords. You also must renumber the remaining keywords so that the numbering is consecutive and the max is the same as the total number, otherwise the tool will fail. You can use the FTOOL fv to accomplish this, but other FTOOLS such as fmodhead or fparkey should also work.

To avoid this error, when using gtselect be certain to match the following parameters to the exact values used when extracting the data from the LAT data server:

  • Minimum and maximum event energies
  • RA and DEC positions for the acceptance cone
  • Tmin and Tmax in MET

CALDB File Not Found Error

You may encounter the error Caught St13runtime_error at the top level: File not found: when running some tools, like gtexpcube2 or gtsuntemp. This error occurs when the irfs input parameter is set to CALDB, and the optional input counts map is set to none. The problem is that CALDB cannot find the EVENT_CLASS keyword in any of the input files and cannot determine the proper IRF to use. In these cases, you must explicitly set the IRF to use (e.g., P8R3_SOURCE_V2). Note the irfs parameter may be a hidden option on some tools. Future versions of the tools will make the error message more explicit.

CFITSIO library mismatch

You may see a message like WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This warning occurs due to the fact that astropy carries a different version of CFITSIO than the version the FSSC builds the conda binaries against. This should not cause any issues with analysis.

External program cannot load shared library

If you are attempting to run an external program while the conda environment is activated and you are seeing a 'Cannot load shared library' error, prepend the location of the environment's libraries to the from of your $LD_LIBRARY_PATH:

bash: export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
(t)csh: setenv LD_LIBRARY_PATH $CONDA_PREFIX/lib:$LD_LIBRARY_PATH

Parameter not found (N5hoops10HexceptionE)

This can be caused by a corrupt or old parameter file, which specifies the input to a tool. Try removing the parameter file for the problem tool in your $HOME/pfiles directory (e.g., rm $HOME/pfiles/gtlike.par). When you run the tool again, it will install a fresh copy of the .par file into your pfiles directory.

Python crashing due to Core Dump on import of Unbinned/Binned Analysis modules

This is a known issue currently under investigation. The recommended work around until a patch is released is to import Fermitools modules BEFORE importing Astropy in order to avoid import library collisions.

ModuleNotFoundError: No module named 'gt_apps'

This indicates that the version of Python being used is not the one in the Fermitools environment. Make sure you have the correct conda environment activated. If you are encountering this error in a Jupyter notebook, make sure that you have installed nb_conda and are running the notebook server in the Fermitools environment as described in User Notes.