Update of bug #23933 (project relax):
Category: GUI => relax's source code
Status: None => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #3:
This bug report consists of two issues: 1. The comparison to 'None' warning;
2. The 'NameError: global name 'ids' is not defined' error.
=== Comparison to 'None' ===
Modified from
http://thread.gmane.org/gmane.science.nmr.relax.user/1839/focus=1842 :
This warning is due to something called a FutureWarning which was introduced
into numpy >= 1.9. It looks like the numpy would like to change how '=='
operates on their numpy arrays. So the previous relax code was of the form:
if vector == None:
This used to work and was good for checking if we had set a value. However
the numpy people would like us to now instead use:
if vector is None:
To fix this, the suite was run with Python 3.5 and numpy 1.9.2, using:
$ python3.5 relax -x -d --tee test_suite.log --traceback
All these FutureWarnings were found and '==' and '=!' was replaced with 'is'
and 'is not' to silence them all. This was also fixed in minfx
<https://gna.org/projects/minfx/> and bmrblib
<https://gna.org/projects/bmrblib/>.
=== 'ids' is missing ===
The Mf.test_bug_23933_relax_data_read_ids system test was created based on the
attached data files, truncated to residues 329, 330, and 331. It catches the
error:
relax> relax_data.read(ri_id='R1_600', ri_type='R1', frq=600402816.0,
file='r1_600.txt',
dir='/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids',
spin_id_col=None, mol_name_col=None, res_num_col=1, res_name_col=None,
spin_num_col=None, spin_name_col=None, data_col=2, error_col=3, sep=None,
spin_id=None)
Opening the file
'/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids/r1_600.txt'
for reading.
Traceback (most recent call last):
File "/data/relax/relax-trunk/test_suite/system_tests/model_free.py", line
499, in test_bug_23933_relax_data_read_ids
self.interpreter.relax_data.read(ri_id='R1_600', ri_type='R1',
frq=600402816.0, file='r1_600.txt', dir=path, res_num_col=1, data_col=2,
error_col=3)
File "/data/relax/relax-trunk/prompt/uf_objects.py", line 225, in __call__
self._backend(*new_args, **uf_kargs)
File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 920, in
read
pack_data(ri_id, ri_type, frq, values, errors, mol_names=mol_names,
res_nums=res_nums, res_names=res_names, spin_nums=spin_nums,
spin_names=spin_names, spin_id=spin_id)
File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 767, in
pack_data
if ids:
NameError: global name 'ids' is not defined
The problem was missing code that was planned to be added to relax, but never
was. Now the correct behaviour occurs and the error is now seen correctly:
relax> relax_data.read(ri_id='R1_600', ri_type='R1', frq=600402816.0,
file='r1_600.txt',
dir='/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids',
spin_id_col=None, mol_name_col=None, res_num_col=1, res_name_col=None,
spin_num_col=None, spin_name_col=None, data_col=2, error_col=3, sep=None,
spin_id=None)
Opening the file
'/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids/r1_600.txt'
for reading.
Traceback (most recent call last):
File "/data/relax/relax-trunk/test_suite/system_tests/model_free.py", line
499, in test_bug_23933_relax_data_read_ids
self.interpreter.relax_data.read(ri_id='R1_600', ri_type='R1',
frq=600402816.0, file='r1_600.txt', dir=path, res_num_col=1, data_col=2,
error_col=3)
File "/data/relax/relax-trunk/prompt/uf_objects.py", line 225, in __call__
self._backend(*new_args, **uf_kargs)
File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 925, in
read
pack_data(ri_id, ri_type, frq, values, errors, mol_names=mol_names,
res_nums=res_nums, res_names=res_names, spin_nums=spin_nums,
spin_names=spin_names, spin_id=spin_id)
File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 773, in
pack_data
raise RelaxMultiSpinIDError(spin_ids[i], new_ids)
RelaxMultiSpinIDError: RelaxError: The spin ID
'#LARA_N_term_no_helixFH_reg_mol24:331' corresponds to multiple spins,
including '#LARA_N_term_no_helixFH_reg_mol24:331@N' and
'#LARA_N_term_no_helixFH_reg_mol24:331@H'.
The problem here is that the relaxation data needs to be loaded for either the
'N' or 'H' spins - the user function call is ambiguous and relax cannot work
out for which spin the data is for.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23933>
_______________________________________________
Message sent via/by Gna!
http://gna.org/