Hi Olivier

I had a similar problem once, which I solved by converting the input out 
of a list to a string:

Your command:      

select_obj.append(Selection(selection[i]))

Change it to:

select_obj.append(Selection(str(selection[i])))


--> change selection[i] to str(selection[i])

Python sometimes reads string entries from a list as u'stringofentry'.

Hope this helps

Cheers
Michael


Olivier Serve schrieb:
> Dear Edward,
>       Thank you for answering so quickly. I will send you all details 
> tomorrow (It is night time for me now). But what I can say in the mean time, 
> is that : "RelaxError: The selection string u'u' is invalid" is the full 
> error message, quite short indeed, it took me long time to find this. The 
> modsel.py is almost same, I just use model 0 to 5, instead of 0 to 9. But as 
> I wrote in my previous mail, I am not at all sure that my solution is 
> pertinent.
>       I'll to send you a tar file tomorrow with all details.
>
> Have a nice day,
> Bye,
> Olivier Serve
> Olivier Serve
>
> Le 1 déc. 2009 à 22:40, Edward d'Auvergne a écrit :
>
>   
>> Hi,
>>
>> I have a feeling that the problem lies elsewhere.  This change would
>> probably be fatal - are the models correctly selected?  Could you cut
>> and paste the full error message?  And maybe attach the modsel.py
>> script?  Without this, I'm not sure where the failure point is so I
>> don't know what the problem could be or what the cause is.
>>
>> Cheers,
>>
>> Edward
>>
>>
>>
>> 2009/12/1 Olivier Serve <[email protected]>:
>>     
>>> Hi all,
>>>        I wrote possible bug in my title, because I am not sure yet it is 
>>> not my mistake. Here is my problem :
>>>        I ran smoothly all the following scripts : noe.py, relax-fit.py, 
>>> mf_multimodel.py. But when I ran the modsel.py, I got the following error 
>>> message : RelaxError: The selection string u'u' is invalid. (The name of 
>>> the molecule begins by 'u' (ubiquitin))
>>>        I tracked down the error (very deep) into relax : modsel.py -> 
>>> prompt/model_selection.Modsel -> 
>>> generic_func/model_selection.select->specific_fns/model_free/main.duplicate_data->generic_fns/sequence.generate->generic_fns/mol_res_spin.return_spin
>>>  at line 1879.
>>>        The code is the following : (selection is a selection string : 
>>> #<mol_name> :<res_id>[, <res_id>[, <res_id>, ...]] @<atom_id>[, <atom_id>[, 
>>> <atom_id>, ...]],)
>>>            if type(selection) == str:
>>>                selection = [selection]
>>>            select_obj = []
>>>            for i in range(len(selection)):
>>>                select_obj.append(Selection(selection[i]))
>>>
>>>        I think the problem here is that there is an iteration over a 
>>> selection string (something like #ubi....), so when the Selection function 
>>> sees 'u' alone, it does not mean anything and it raises the error.
>>>        I turn the code into :
>>>                select_obj=Selection(selection)
>>>        And change the code accordingly a few lines after. The script seemed 
>>> to have run smoothly afterward.
>>>
>>>        If this is a bug, I'll be glad to open a bug report. If not, well, 
>>> I'll be glad to know what I am doing wrong.
>>>
>>> I wish all of you a nice day,
>>> Best regards,
>>> Olivier Serve
>>>
>>>
>>> _______________________________________________
>>> relax (http://nmr-relax.com)
>>>
>>> This is the relax-users mailing list
>>> [email protected]
>>>
>>> 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-users
>>>
>>>       
>
>
> _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-users mailing list
> [email protected]
>
> 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-users
>
>   


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

This is the relax-users mailing list
[email protected]

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-users

Reply via email to