Hello,
Sorry, but in my system without the indentation the program does not start.
Take the indent and I have got these errors.
Best,
Attila
2013-02-10 11:31 keltezéssel, Wayne Boucher írta:
> Hello,
>
> That means you did not indent that line extra relative to the line
> above it. Python is strict about indentation. It doesn't matter how
> much you indent it but we generally use two spaces extra for each
> block of code.
>
> Wayne
>
> On Sun, 10 Feb 2013, Balázs Attila wrote:
>
>> Thanks the information. Write New CCPN project, still not working.
>> At the moment for
>> these modification the program is not running:
>>
>> $ ./specView
>> Model read finished. Duration 0.515579938889
>> Model validity check skipped
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py",
>> line 427, in
>> <module>
>> from ccpnmr.specView.gui.SpecViewMain import SpecViewMain
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 34,
>> in <module>
>> from ccpnmr.specView.io.ExportCcpnProject import makeCcpnProject,
>> appendCcpnProject
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 233
>> peak.details = ' '.join(annotations)
>> ^
>> IndentationError: expected an indented block
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line
>> 66, in
>> apport_excepthook
>> from apport.fileutils import likely_packaged, get_recent_crashes
>> File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1,
>> in <module>
>> from apport.report import Report
>> File "/usr/lib/python2.7/dist-packages/apport/report.py", line 18,
>> in <module>
>> import problem_report
>> File "/usr/lib/python2.7/dist-packages/problem_report.py", line 14,
>> in <module>
>> import zlib, base64, time, sys, gzip, struct, os
>> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
>> class GzipFile(io.BufferedIOBase):
>> AttributeError: 'module' object has no attribute 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py",
>> line 427, in
>> <module>
>> from ccpnmr.specView.gui.SpecViewMain import SpecViewMain
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 34,
>> in <module>
>> from ccpnmr.specView.io.ExportCcpnProject import makeCcpnProject,
>> appendCcpnProject
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 233
>> peak.details = ' '.join(annotations)
>> ^
>> IndentationError: expected an indented block
>>
>> Best,
>> Attila
>>
>>
>> 2013/2/10 Wayne Boucher <[log in to unmask]>
>> Ah, that is a new bug for us. So to fix that one, you need to
>> edit
>>
>> /home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.p
>>
>> and where it says around line 232
>>
>> peak = ccpnPeakList.newPeak()
>> peak.details = ' '.join(annotations)
>>
>> you need to change that to
>>
>> peak = ccpnPeakList.newPeak()
>> if annotations:
>> peak.details = ' '.join(annotations)
>>
>> (in case the email messes up the formatting, the first two
>> lines should have
>> the same indentation and the last line indented relative to
>> those).
>>
>> Wayne
>>
>> On Sat, 9 Feb 2013, Balázs Attila wrote:
>>
>> Thank you the fast answer.
>> Half of the problem solved. The peak export now working. :)
>> But I still can't save the project. When I try, the
>> console show
>> this:
>>
>> $ ./specView
>> Model read finished. Duration 0.507003068924
>> Model validity check skipped
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File
>> "/usr/lib/python2.7/dist-packages/apport_python_hook.py",
>> line 66, in apport_excepthook
>> from apport.fileutils import likely_packaged,
>> get_recent_crashes
>> File
>> "/usr/lib/python2.7/dist-packages/apport/__init__.py", line
>> 1, in <module>
>> from apport.report import Report
>> File
>> "/usr/lib/python2.7/dist-packages/apport/report.py", line
>> 18, in <module>
>> import problem_report
>> File
>> "/usr/lib/python2.7/dist-packages/problem_report.py", line
>> 14, in <module>
>> import zlib, base64, time, sys, gzip, struct, os
>> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
>> class GzipFile(io.BufferedIOBase):
>> AttributeError: 'module' object has no attribute
>> 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File
>> "/usr/lib/python2.7/dist-packages/apport_python_hook.py",
>> line 66, in apport_excepthook
>> from apport.fileutils import likely_packaged,
>> get_recent_crashes
>> File
>> "/usr/lib/python2.7/dist-packages/apport/__init__.py", line
>> 1, in <module>
>> from apport.report import Report
>> File
>> "/usr/lib/python2.7/dist-packages/apport/report.py", line
>> 18, in <module>
>> import problem_report
>> File
>> "/usr/lib/python2.7/dist-packages/problem_report.py", line
>> 14, in <module>
>> import zlib, base64, time, sys, gzip, struct, os
>> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
>> class GzipFile(io.BufferedIOBase):
>> AttributeError: 'module' object has no attribute
>> 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>> kanyi@mamut:~/ccpnmr/ccpnmr3.0/bin$ ./specView
>> Model read finished. Duration 0.5091381073
>> Model validity check skipped
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File
>> "/usr/lib/python2.7/dist-packages/apport_python_hook.py",
>> line 66, in apport_excepthook
>> from apport.fileutils import likely_packaged,
>> get_recent_crashes
>> File
>> "/usr/lib/python2.7/dist-packages/apport/__init__.py", line
>> 1, in <module>
>> from apport.report import Report
>> File
>> "/usr/lib/python2.7/dist-packages/apport/report.py", line
>> 18, in <module>
>> import problem_report
>> File
>> "/usr/lib/python2.7/dist-packages/problem_report.py", line
>> 14, in <module>
>> import zlib, base64, time, sys, gzip, struct, os
>> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
>> class GzipFile(io.BufferedIOBase):
>> AttributeError: 'module' object has no attribute
>> 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line 897, in writeCcpn
>> makeCcpnProject(projDir, projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 11, in makeCcpnProject
>> exportSpectraToCcpn(memopsRoot, spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 208, in exportSpectraToCcpn
>> makeCcpnPeaks(spectrum.peakList, peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line 232, in makeCcpnPeaks
>> peak.details = ' '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>> memops.Implementation.Text: Empty string not
>> allowed:
>>
>> The solution for this is still easy, or this is a bigger
>> problem?
>>
>> Best,
>> Attila
>>
>> 2013-02-09 19:28 keltezéssel, Wayne Boucher írta:
>> The change will not take effect until SpecView is
>> restarted.
>>
>> Wayne
>>
>> On Sat, 9 Feb 2013, Wayne Boucher wrote:
>>
>> Hello,
>>
>> If you edit
>> /home/kanyi/ccpnmr/ccpnmr3.0/python/memops/qtgui/Table.py
>> and go to line 1316 then change that
>> "popup" to a "self":
>>
>> fileName = selectSaveFile(self, 'Select
>> Export File', fileTypes=fileTypes)
>>
>> Regards, Wayne
>>
>> On Sat, 9 Feb 2013, Balázs Attila wrote:
>>
>> Hello.
>>
>> I'm found a problem in
>> SpectView 3.0. When I take one
>> or more peak on spectrum,
>> can't save
>> the project. (Ubuntu 12.04,
>> 64bit)
>>
>> When I try export the
>> peaklist:
>>
>> $ ./specView
>> Model read finished. Duration
>> 0.512344837189
>> Model validity check skipped
>> Traceback (most recent call
>> last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/memops/qtgui/Table.py",
>> line 1316, in saveFile
>> fileName =
>> selectSaveFile(popup, 'Select
>> Export File',
>> fileTypes=fileTypes)
>> NameError: global name 'popup'
>> is not defined
>> Error in sys.excepthook:
>> Traceback (most recent call
>> last):
>> File
>> "/usr/lib/python2.7/dist-packages/apport_python_hook.py",
>> line 66, in
>> apport_excepthook
>> from apport.fileutils
>> import likely_packaged,
>> get_recent_crashes
>> File
>> "/usr/lib/python2.7/dist-packages/apport/__init__.py",
>> line 1, in <module>
>> from apport.report import
>> Report
>> File
>> "/usr/lib/python2.7/dist-packages/apport/report.py",
>> line 18, in <module>
>> import problem_report
>> File
>> "/usr/lib/python2.7/dist-packages/problem_report.py",
>> line 14, in <module>
>> import zlib, base64, time,
>> sys, gzip, struct, os
>> File
>> "/usr/lib/python2.7/gzip.py",
>> line 36, in <module>
>> class
>> GzipFile(io.BufferedIOBase):
>> AttributeError: 'module'
>> object has no attribute
>> 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call
>> last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/memops/qtgui/Table.py",
>> line 1316, in saveFile
>> fileName =
>> selectSaveFile(popup, 'Select
>> Export File',
>> fileTypes=fileTypes)
>> NameError: global name 'popup'
>> is not defined
>>
>>
>> And when I try save the
>> project:
>>
>>
>> $ ./specView
>> Model read finished. Duration
>> 0.512344837189
>> Model validity check skipped
>> Traceback (most recent call
>> last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line
>> 897, in writeCcpn
>> makeCcpnProject(projDir,
>> projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 11, in makeCcpnProject
>>
>> exportSpectraToCcpn(memopsRoot,
>> spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 208, in exportSpectraToCcpn
>>
>> makeCcpnPeaks(spectrum.peakList,
>> peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 232, in makeCcpnPeaks
>> peak.details = '
>> '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>>
>> memops.Implementation.Text:
>> Empty string not allowed:
>> Error in sys.excepthook:
>> Traceback (most recent call
>> last):
>> File
>> "/usr/lib/python2.7/dist-packages/apport_python_hook.py",
>> line 66, in
>> apport_excepthook
>> from apport.fileutils
>> import likely_packaged,
>> get_recent_crashes
>> File
>> "/usr/lib/python2.7/dist-packages/apport/__init__.py",
>> line 1, in <module>
>> from apport.report import
>> Report
>> File
>> "/usr/lib/python2.7/dist-packages/apport/report.py",
>> line 18, in <module>
>> import problem_report
>> File
>> "/usr/lib/python2.7/dist-packages/problem_report.py",
>> line 14, in <module>
>> import zlib, base64, time,
>> sys, gzip, struct, os
>> File
>> "/usr/lib/python2.7/gzip.py",
>> line 36, in <module>
>> class
>> GzipFile(io.BufferedIOBase):
>> AttributeError: 'module'
>> object has no attribute
>> 'BufferedIOBase'
>>
>> Original exception was:
>> Traceback (most recent call
>> last):
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecViewMain.py",
>> line
>> 897, in writeCcpn
>> makeCcpnProject(projDir,
>> projName, self.spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 11, in makeCcpnProject
>>
>> exportSpectraToCcpn(memopsRoot,
>> spectra)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 208, in exportSpectraToCcpn
>>
>> makeCcpnPeaks(spectrum.peakList,
>> peakList)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/io/ExportCcpnProject.py",
>> line
>> 232, in makeCcpnPeaks
>> peak.details = '
>> '.join(annotations)
>> File
>> "/home/kanyi/ccpnmr/ccpnmr3.0/python/ccp/api/nmr/Nmr.py",
>> line 52270, in setDetails
>> + ": %s" % (value,)
>> memops.general.Implementation.ApiError:
>> ccp.nmr.Nmr.Peak.setDetails:
>>
>> memops.Implementation.Text:
>> Empty string not allowed:
>>
>>
>> Any idea how can I solve these
>> situation?
>>
>> Best,
>> Attila
>>
>>
>>
>>
>>
|