Subject: Re: [nmr_sparky] Re: problem with cormaspectrum command
From: Tom Goddard
Date: May 8, 2012

Previous: 827 Next: 832


Sparky is using Python os.fork() to run a stand-alone program peaks2ucsf that comes with Sparky in order to generate the CORMA spectrum. The fork routine is not available on Windows, so the CORMA spectrum capability cannot be used on Windows. This needs to be documented in the Sparky manual. It should work on Linux and Mac.

Tom

Thanks for the help, with the new version, the extension problem has been fixed, but cormaspectrum still can not running well.

it is stopped like below

Exception in Tkinter callback
Exception exceptions.AttributeError: subprocess instance has no attribute to_process in bound method subprocess.__del__ of sparky.subprocess.subprocess instance at 0x06F64B48 ignored
Traceback (most recent call last):
File C:sparky-win32sparkypythonlib-tkTkinter.py, line 1345, in __call__
return self.func(*args)
File C:sparky-win32sparkypythonsparkycormaspectrum.py, line 105, in create_spectrum_cb
sfreq, swidth, gaussians)
File C:sparky-win32sparkypythonsparkycormaspectrum.py, line 209, in run_peaks2ucsf
proc = subprocess.subprocess(p2u_path, save_path)
File C:sparky-win32sparkypythonsparkysubprocess.py, line 20, in __init__
pid = os.fork()
AttributeError: module object has no attribute fork

--- In nmr_sparky@yahoogroups.com , Tom Goddard goddard@... wrote:

Current Sparky versions (3.114 and 3.115) use Python 2.5 which is
included with Sparky. Get the current version of Sparky and your
problem will be solved. You will not need to edit any files.

Tom


The problem is I can not load Python extensions directly.

My system is windows2008 server, and with sparky copied in the folder
C:Program Filessciencesparky. And I have python27 in my c drive
instead of python21. I modified the sparky.bat

set SPARKY_INSTALL=c:Progra~1sciencesparky
set PYTHON=c:Python27python.exe

the changing of the spark_install line make the sparky running,
but if I change the PYTHON line, sparky automatically crashed.
DO I need to install python21?

--- In nmr_sparky@yahoogroups.com
mailto:nmr_sparky%40yahoogroups.com , Tom Goddard goddard@ wrote:

The cormaspectrum.py file is not a command-line program. It is part of
Sparky code that implements the menu entry Extensions / Spectrum /CORMA
spectrum described in the manual


http://www.cgl.ucsf.edu/home/sparky/manual/extensions.html#CormaSpectrum

It reads the output file produced by CORMA, so you will have to install
and run that program to use it. (If you want to know, the import
sparky line will import file sparky/python/sparky/__init__.py__ when it
is run using the Sparky menu entry.)

Tom



Dear all,

This is the first time I use this command, but I faced some problem.

After I press enter with the command line I got information like below.

C:Program Filessciencesparkypythonsparkycormaspectrum.py
rx_d300_20C.int.1

Traceback (most recent call last):
File C:Program Filessciencesparkypythonsparkycormaspectrum.py,
line 7,
in module
import corma
File C:Program Filessciencesparkypythonsparkycorma.py, line 7,
in module
import atoms
File C:Program Filessciencesparkypythonsparkyatoms.py, line
23, in module
import sputil
File C:Program Filessciencesparkypythonsparkysputil.py, line
13, in module
import sparky
ImportError: No module named sparky

Looks like the problem is from the file sputil.py, which want import
sparky on its 13rd line. But I did not see sparky.py in this
pythonsparky folder.

Could anybody tell me where I should point this file to. It is the
sparky.bat in the bin folder?

Thanks a lot.

_,_._,___