.. _user-guide-errors: 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. .. _user-error-simulation: Simulation warnings/error messages ---------------------------------- .. topic:: 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: .. code-block:: python class RandomGeneratorBase(metaclass=ABCMeta): ^ This error is most likely caused by using Python 2. **Fix**: Use Python 3, or report this as a bug. .. topic:: Error: ``Unknown engine XXX`` An unknown engine was requested in the input. **Fix**: Specify an engine in the |pyretis| input (see the :ref:`engine section `). .. topic:: 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. .. topic:: 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 perform in order to see what simulation settings you will need to set. **Fix**: Update your input settings. .. _user-errors-plotting: Plotting warnings/error messages -------------------------------- .. topic:: 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 given above). **Fix**: N/A. Note that this behaviour might change in the future if support for older matplotlib versions is dropped from |pyretis|. .. topic:: Warning: ``Using Matplotlib version < 1.4.0, please upgrade it!'`` We recommend using a more recent matplotlib version than 1.4. These versions support styles for plotting which makes it easier to customize the figures for the reports. **Fix**: Upgrade matplotlib. .. topic:: ``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. .. _user-errors-analysis: Analysis warnings/error messages -------------------------------- .. topic:: ``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. .. topic:: ``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).