mailRe: [bug #15321] Bad syntac in "minimise/line_search/more_thuente.py"


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on February 11, 2010 - 10:11:
Hi,

It is a very easy fix, and you could even find the minfx commit
message to see all of the changes required
(https://mail.gna.org/public/minfx-commits/).  So feel free to make
this.  An alternative is to use python versions <= 2.5.

Cheers,

Edward


On 11 February 2010 04:44, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> 
wrote:
Hi Ed,

Yes, using the old 1.2 line is a bit weird, but we just wanted to calculate
some reduced spectral density stuff again using the same script as 1-2 years
ago...

I guess it may be a good idea to fix the problem since it is not very hard
to do. If you wish, I could do the fix by changing the variable name for its
name in minfx...

Regards,


Séb


On 10-02-09 10:20 AM, Edward d'Auvergne wrote:

Hi,

Unfortuanately what you have encountered here is a Python 'feature'.
They have decided that 'as' will now be a python statement, so this
assignment "as = ..." fails.  This is in Python 2.6 and higher.  minfx
1.0.2 was released to fix this problem
(https://gna.org/forum/forum.php?forum_id=2103).  Unfortunately
relax-1.2 does not use minfx, so you will not benefit from this fix :S
 The other test suite failures were always there.  These just indicate
that that code is incomplete (in the 1.3 line they are complete).  Is
there a reason you are using the 1.2 line?  This hasn't been touched
in years ;)  If really necessary, the as statement problem could be
easily fixed in the 1.2 line.  I changed 'as' to 'asec' in minfx, and
the same change could be made again.

Regards,

Edward


On 9 February 2010 15:56, Sébastien Morin
<NO-REPLY.INVALID-ADDRESS@xxxxxxx>  wrote:


URL:
 <http://gna.org/bugs/?15321>

                Summary: Bad syntac in
"minimise/line_search/more_thuente.py"
                Project: relax
           Submitted by: semor
           Submitted on: Tuesday 02/09/2010 at 09:56
               Category: relax's source code
               Severity: 5 - Blocker
               Priority: 7 - High
                 Status: None
                Privacy: Public
            Assigned to: None
        Originator Name:
       Originator Email:
            Open/Closed: Open
        Discussion Lock: Any
                Release: Repository: 1.2 line
       Operating System: GNU/Linux

   _______________________________________________________

Details:

Hi,

Trying to use relax-1.2 (up-to-date repository line, r10688), we went
into a
syntax problem. This was probably introduced by new versions of Numeric
(or
any other dependency). The problem was as follows when invoking relax
(either
relax alone or with any option such as -h, -d, --test-suite):

=========================
Traceback (most recent call last):
 File "./relax", line 76, in<module>
   from prompt.interpreter import Interpreter
 File "/home/pys/relax-1.2/prompt/interpreter.py", line 42, in<module>
   from dx import OpenDX
 File "/home/pys/relax-1.2/prompt/dx.py", line 29, in<module>
   from specific_fns.model_free import Model_free
 File "/home/pys/relax-1.2/specific_fns/model_free.py", line 33, in
<module>
   from minimise.generic import generic_minimise
 File "/home/pys/relax-1.2/minimise/generic.py", line 26, in<module>
   from coordinate_descent import coordinate_descent
 File "/home/pys/relax-1.2/minimise/coordinate_descent.py", line 26, in
<module>
   from base_classes import Line_search, Min
 File "/home/pys/relax-1.2/minimise/base_classes.py", line 46, in<module>
   from line_search.more_thuente import more_thuente
 File "/home/pys/relax-1.2/minimise/line_search/more_thuente.py", line
385
   as = secant(al, at, gl, gt)
    ^
SyntaxError: invalid syntax

=========================

Opening the file "minimise/line_search/more_thuente.py" in vim, we saw
that
the string "as" was colored differently than the rest.

We then had the idea that maybe "as" was now a variable inside Numeric
(or
any other dependency) and we changed "as" for something else such as
"RogerMoquin".

The problem was solved and the prompt now worked properly..!

We ran the test-suite and, however, saw that three tests were not
passing.
These are:

==========================
Loading a sequence from a PDB file
The user function angles()
Loading of Sparky peak heights
==========================

Were these tests broken before we changed the variable "as" to
"RogerMoquin"
?

Is this problem as easy to solve as we propose here ?

Thank you !

Sébastien&  Pierre-Yves




   _______________________________________________________

Reply to this item at:

 <http://gna.org/bugs/?15321>

_______________________________________________
 Message sent via/by Gna!
 http://gna.org/


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel



--
Sébastien Morin
PhD Student
S. Gagné NMR Laboratory
Université Laval&  PROTEO
Québec, Canada





Related Messages


Powered by MHonArc, Updated Fri Feb 12 15:00:21 2010