On 01/09/2013 09:14 PM, 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.
Hi Craig
I think this is the expected result and here is an analysis of what is
going on.
note for what follows I will use <space> in some places to show where
the space character should be
I think this might be to do with quotes and escaping and unix. At the
prompt a string is treated as implicitly not being quoted and meta
character processing is applied by the shell. Therefore \<space> gets
replaced by a space and $HOME for example gets replaced by your home
directory from the environment variable HOME ($ and \ are the meta
characters and get replaced by something other than simple text).
However, if you put the whole string in single quotes this switches off
all meta character processing withig the string which occurs normally
when the file is read so \<space> remains in the string.
for example if it type this in my command prompt
set test='wibbled\ test'
echo $test
i get
wibbled\ test
this is a general unix thing (note double quotes "" do something in
between see http://www.grymoire.com/Unix/Quote.html for all the gory
details)
you may also be interested in the command cygpath
http://www.cygwin.com/cygwin-ug-net/using-utils.html#cygpath which
converts unix paths to windows and vice versa in cygwin
regards
gary
> 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
>>
--
-------------------------------------------------------------------
Dr Gary Thompson [Homans Lab Research Coordinator]
Astbury Centre for Structural Molecular Biology,
University of Leeds,
Leeds, LS2 9JT, West-Yorkshire, UK Tel. +44-113-3433024
email: [log in to unmask] Fax +44-113-3431935
-------------------------------------------------------------------
|