# Troubleshooting¶

This page is an attempt to keep track of common errors and instructions for how to fix them. If you encounter a bug not listed below, fork ares on bitbucket and an issue a pull request to contribute your patch, if you have one. Otherwise, shoot me an email and I can try to help. It would be useful if you can send me the dictionary of parameters for a particular calculation. For example, if you ran a global 21-cm calculation via

import ares

pars = {'parameter_1': 1e6, 'parameter_2': 2} # or whatever

sim = ares.simulations.Global21cm(**pars)
sim.run()


and you get weird or erroneous results, pickle the parameters:

import pickle
f = open('problematic_model.pkl', 'wb')
pickle.dump(pars, f)
f.close()


and send them to me. Thanks!

Note

If you’ve got a set of problematic models that you encountered while running a model grid or some such thing, check out the section on “problem realizations” in Analyzing Model Grids / Monte Carlo Simulations.

## Plots not showing up¶

If when running some ARES script the program runs to completion without errors but does not produce a figure, it may be due to your matplotlib settings. Most test scripts use draw to ultimately produce the figure because it is non-blocking and thus allows you to continue tinkering with the output if you’d like. One of two things is going on:

• You invoked the script with the standard Python interpreter (i.e., not iPython). Try running it with iPython, which will spit you back into an interactive session once the script is done, and thus keep the plot window open.

## General Mysteriousness¶

• If you’re running ARES from within an iPython (or Jupyter) notebook, be wary of initializing class instances in one notebook cell and modifying attributes in a separate cell. If you re-run the the second cell without re-running the first cell, this can cause problems because changes to attributes will not automatically propagate back up to any parent classes (should they exist). This is known to happen (at least) when using the ModelGrid and ModelSamples classes in the inference sub-module.