Some common PyRETIS errors

In this section we describe some of the most common PyRETIS warning or error messages and how these errors can be resolved.

Simulation warnings/error messages

Error: SyntaxError: invalid syntax

This is either a plain bug in the PyRETIS source code or it can be caused by using Python 2.x. If the bug is related to something like this:

class RandomGeneratorBase(metaclass=ABCMeta):
                                 ^

This error is most likely caused by using Python 2.

Fix: Use Python 3, or report this as a bug.

Error: Unknown engine XXX

An unknown engine was requested in the input.

Fix: Specify an engine in the PyRETIS input (see the engine section).

Warning: No random seed given. Will just use "0"

If a random generator is needed and the seed value has not been set, PyRETIS will use a seed equal to 0. This message is just to remind the user that not setting a seed is the same as setting it to zero.

Fix: Are you ok with this seed? If not, change it in the input settings.

Error: XXX settings not found: YYY/ValueError('Please update settings!')

For simulation type XXX the required settings YYY was not found in the input. Please read the manual describing the simulation you wish to preform in order to see what simulation settings you will need to set.

Fix: Update your input settings.

Plotting warnings/error messages

Warning: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.

PyRETIS supports different versions of matplotlib. In the most recent matplotlib versions, the color cycle is set using axes.prop_cycle, while axes.color_cycle was used in previous versions. Currently PyRETIS will try to set axes.color_cycle as the most recent version of matplotlib will accept this, albeit with some complaining (i.e. the warning message give above).

Fix: N/A. Note that this behaviour might change in the future if support for older matplotlib versions is dropped from PyRETIS.

Warning: Using Matplotlib version < 1.4.0, please upgrade it!'

We recommend using a more recent matplotlib version than 1.4. These versions supports styles for plotting which makes it easier to customize the figures for the reports.

Fix: Upgrade matplotlib.

Overriding color cycle

When plotting with matplotlib, the selection of colors is typically handled by matplotlib and the selected plotting style. When plotting a lot of data series in the same plot, we might run out of distinct colors. PyRETIS will then create some ad-hoc colors so that the series can be distinguished. Note that these colors may not be good enough for colorblindness or gray-scale images. Here, we recommend writing your own plotting routine or updating the color cycle settings in the plot settings file.

Fix: Make a custom plot or modify the PyRETIS matplotlib style.

Analysis warnings/error messages

Ignored unknown mc move: XXX

This warning is given when the analysis encounters a path that was not generated by any of the known (to PyRETIS) Monte Carlo moves. These paths are NOT included when obtaining path lengths for histograms in the analysis.

Fix: If this happens for your own modified version of PyRETIS, double check the path analysis routines and the method generating the path.

The number of paths stored in path ensemble does not correspond to the number of paths seen by the path ensemble! Consider re-running the analysis using the path ensemble file!

The analysis can be run on either path ensemble objects or on path ensemble files. The path ensemble object stores a finite number of paths (or rather representation of paths) which means that the path ensemble does not necessarily store (in memory) all the paths – some will be stored in a path ensemble file when the path ensemble object is “full”. This warning means that this has happened and that it will be more correct to run the analysis using the path ensemble file.

Fix: Run the analysis using the path ensemble file as the source (see the section describing the analysis tool).