Print

Print


Hello,

I'm glad the / \ issue is resolved.

On the compatibility front, you should get the updates (Project --> 
Updates).  (In Windows you have to run the program as administrator but I 
don't know what cygwin would do for that.)  That should let you load new 
data.  (I assume you have some data created with SpecView or ChemBuild, 
otherwise I'm puzzled how this message was even triggered.)

For the other issues, I can't see any sensible way they could be being
triggered, which makes me wonder if running it through cygwin is causing 
the problem.  One way to diagnose the "not a modeled attribute" error a 
bit more is to go into the CCPN\ccpn\python\ccp\api\nmr\NmrCalc.py file 
and where it is complaining, at line 6652, you should see code like:

         for key, value in attrlinks.iteritems():
           try:
             func = getattr(self.__class__, key).fset
           except:
             raise ApiError("%s: error setting %s - not a modeled attribute"
                            % (self, key))

You could change that to just:

         for key, value in attrlinks.iteritems():
           func = getattr(self.__class__, key).fset

(the "f" in "func" should line up under the "r" in "for") and see what the 
error message is according to Python (rather than as CCPN is massaging 
it).  When key is "groupId" it is triggering the exception but it 
shouldn't be since "groupId" is an attribute.

I couldn't trigger this exception on my Windows version, so it created a 
RunParameter with groupId as an attribute ok.

Wayne

On Wed, 9 Jan 2013, McElroy, Craig wrote:

> Wayne,
>
> Thank you so much for the prompt reply. I know I'm probably crazy for trying this on a windows machine, but I don't have a linux box anymore, so windows 7 is my only option at the moment.
>
> So the problem from the aria side was an issue with the back slashes. On the command line for Cygwin it needs the \ before a space or other special character like a ( so I included them in the environment variable. However, it seems when that gets passed to python it gets misinterpreted. Once I fixed that to: setenv PYTHONPATH '/cygdrive/c/Program Files (x86)/CCPN/ccpn/python' it is being recognized and I can import the ccpnmr module. However, if I try and load a ccpn project in the aria gui I get an error:
>
> Could not import
> Memops.format.compatability.downgrad.v_2_1_1
> Forwards compatibility from 2.1.1 to 2.0.5 missing
> Trying to load new-version data with old-version code?
>
> On the other side: The CCPN Data Model is version 2.0.5 and the _fieldNames does include 'groupId'.
> I have the CNS environment variables defined in windows and there are no odd characters. I also discovered that even just moving the mouse over the region where you define the path for the CNS executable and aria calculations I get the error.
>
> Thanks for all your help in trying to trouble shoot this.
>
> Thanks
> Craig
>
>
> -----Original Message-----
> From: CcpNmr software mailing list [mailto:[log in to unmask]] On Behalf Of Wayne Boucher
> Sent: Wednesday, January 09, 2013 1:25 PM
> To: [log in to unmask]
> Subject: Re: CCPN and ARIA on windows
>
> Hello,
>
> Windows, we love it.
>
> Both your variants of setting the PYTHONPATH look ok to me, although I don't know about / vs \ for paths in cygwin, nor how it copes with spaces in path names.  If you are able to run a python (I have a feeling we don't distribute that as is in Windows) command in some shell, after setting the PYTHONPATH, then can you try, at the Python prompt:
>
>>>> import ccpnmr
>
> That is what Aria tries to do in check.py.  Well, it does a bit more but that is the first thing it tries.  If that doesn't work then it is worth also doing:
>
>>>> import sys
>>>> print sys.path
>
> And see if the correct CCPN python directory is indeed listed.
>
> That first error in the other direction, about groupId, is a puzzle.  So that is a modeled attribute in all the versions I've managed to check.  As it happens, it's about to be eliminated as an attribute but in theory nobody in the outside world should have seen that yet, which is worrying (!).  If you look at the top of:
>
> C:\Program Files (x86)\CCPN\ccpn\python\ccp\api\nmr\NmrCalc.py
>
> can you tell me what the CCPN Data Model version is?  It ought to be 2.0.5 if this is Analysis 2.2.2.  In any case, you should also check the class RunParameter in that file (search for "class RunParameter" starting at the first column).  Just below that there is a list of _fieldNames in alphabetic order, and that ought to include 'groupId'.
>
> That Unicode error is happening (I think) when it is trying to check if the CNS executable path exists.  Is there some odd character in that path??
>
> Wayne
>
> On Wed, 9 Jan 2013, Craig McElroy wrote:
>
>> Hi all,
>> Sorry for the long e-mail... I have a number of issues because I'm trying to get CCPN 2.2.2 and ARIA 2.3 working together on a windows machine. I have CNS 1.21 and ARIA 2.3 compiled and functioning in cygwin. I haven't been able to successfully compile CCPN 2.2.2 in cygwin so I have been using the precompiled windows version. However, the directory structure of the precompiled windows version seems to be different than the linux version such that I'm not sure how to set the environment variables in my cshrc file for cygwin. I currently have them set to:
>> setenv CCPNMR_TOP_DIR '/cygdrive/c/Program\ Files\ \(x86\)/CCPN/ccpn'
>> setenv PYTHONPATH '$CCPNMR_TOP_DIR/python:$PYTHONPATH'
>>
>> but have also tried
>> setenv CCPNMR_TOP_DIR '/cygdrive/c/Program\ Files\ \(x86\)/CCPN/'
>> setenv PYTHONPATH '$CCPNMR_TOP_DIR/ccpn/python:$PYTHONPATH'
>>
>> in either case ARIA 2.3 can't find ccpn when I run the check.py script.
>>
>> On the other side I have set the environment variable for ARIA2 in windows and CCPN recognizes it (at least it doesn't give the no local aria error) but I get a number of errors when trying to use the ARIA module. In the window when I click on the Run Settings tab I get:
>>
>>>>> ERROR in ccp.nmr.NmrCalc.RunParameter.__init__
>> WARNING Error in clean-up of incorrectly created object.
>>        Data may be left in an illegal state Exception in Tkinter
>> callback Traceback (most recent call last):
>>  File "Tkinter.pyo", line 1410, in __call__  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\paris\aria\AriaRunFrame.py", line 152, in
>> updateEntryParams  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\ccp\util\NmrCalc.py", line 81, in
>> setRunParameter  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\ccp\api\nmr\NmrCalc.py", line 5499, in
>> newRunParameter  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\ccp\api\nmr\NmrCalc.py", line 6652, in __init__
>> ApiError: <ccp.nmr.NmrCalc.RunParameter ['AT3', 'ARIA', 1, None]>:
>> error setting groupId - not a modeled attribute
>>
>> when I press the Launch ARIA GUI button I get:
>>>>> Exception in Tkinter callback
>> Traceback (most recent call last):
>>  File "Tkinter.pyo", line 1410, in __call__  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\paris\aria\AriaExtendNmrFrame.py", line 244, in
>> runAriaGui  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\paris\aria\AriaExtendNmrFrame.py", line 221, in
>> checkProjectPath  File "genericpath.pyo", line 18, in exists
>> TypeError: coercing to Unicode: need string or buffer, NoneType found
>>
>> and when I press the Setup Project button I get:
>>>>> Exception in Tkinter callback
>> Traceback (most recent call last):
>>  File "Tkinter.pyo", line 1410, in __call__  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\paris\aria\AriaExtendNmrFrame.py", line 250, in
>> setupAriaProject  File "C:\Program Files
>> (x86)\CCPN\ccpn\python\paris\aria\AriaExtendNmrFrame.py", line 221, in
>> checkProjectPath  File "genericpath.pyo", line 18, in exists
>> TypeError: coercing to Unicode: need string or buffer, NoneType found
>>
>> Any help/suggestions/comments would be welcome.
>> Thanks
>> Craig
>>
>