Author: bugman Date: Sat Mar 9 11:38:38 2013 New Revision: 18726 URL: http://svn.gna.org/viewcvs/relax?rev=18726&view=rev Log: Fix for bug #20563 (https://gna.org/bugs/?20563), the end failure of the model-free auto-analysis. This was reported by Stanislava Panova (https://gna.org/users/stacy). The problem was related to the Monte Carlo simulations. The generic_fns.monte_carlo.create_data() function is now asking for the errors associated with a certain data point, even if that data point does not exist. The solution was to check if the relaxation data ID string is present in spin.ri_data_err before accessing the key-value pair (in the specific API _return_error_relax_data() common method). Modified: trunk/specific_fns/api_common.py Modified: trunk/specific_fns/api_common.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/api_common.py?rev=18726&r1=18725&r2=18726&view=diff ============================================================================== --- trunk/specific_fns/api_common.py (original) +++ trunk/specific_fns/api_common.py Sat Mar 9 11:38:38 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2004-2012 Edward d'Auvergne # +# Copyright (C) 2004-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -257,7 +257,13 @@ # Convert to a list. error = [] for ri_id in cdp.ri_ids: - error.append(spin.ri_data_err[ri_id]) + # Handle missing data/errors. + if ri_id not in spin.ri_data_err: + error.append(None) + + # Append the value. + else: + error.append(spin.ri_data_err[ri_id]) # Return the list. return error