[Baypiggies] Fwd: Quick question on pyreport

Vikram K vikthirtyfive at gmail.com
Tue Apr 15 22:14:01 CEST 2014


ok i figured it out. the idea is that you cannot add any of the #! comments
anywhere in your code.

---------- Forwarded message ----------
From: Vikram K <vikthirtyfive at gmail.com>
Date: Tue, Apr 15, 2014 at 2:35 PM
Subject: Quick question on pyreport
To: Baypiggies <baypiggies at python.org>


Please help!

i am trying to create a report for some work i did using python using the
 pyreport module. My report looks something like this:

#!Bla bla bla
#!Bla bla bla
..
..

<python program>

So i am writing my report starting with #! in each line of the report and
then copying the lines of the python program i used in my work (work.py)
without any comments in the new program filename.py.

I am running the program filename.py from the command line of my mac snow
leopard computer and using python 2.7.3:
pyreport filename.py

the program filename.py works fine and generates a pdf report when
filename.py only contains the comment section where each line is prefixed
with #!. I am also able to run the program work.py independently. But  When
i add the program lines of work.py after the comment section in filename.py
and try and run the program filename.py as before i get this message:

dhcp-140-254-202-142:Lynn kat$ pyreport CLL_comparison_report.py
Running python script
/Users/kat/Desktop/PyReport/Lynn/CLL_comparison_report.py:

41523

['1570571_at', '55297', 'CCDC91', 'CCDC91', 'coiled-coil domain containing
91', '12p11.22', '6.766033371', '6.828531308', '6.101595018',
'0.6644383529999995', '6.797620741469344', '1.5849511252316923',
'1.6200358324888804', 'Up', 'Up', 'ILMN_1676523', 'CCDC91', '55297', '12',
'6.4217520050678', '7.4419596592389', '5.35300515025483e-09',
'-7.18875840717484', '1.0202076541710996', '2.0282108689067284', 'Up']

Outputing report to
/Users/kat/Desktop/PyReport/Lynn/CLL_comparison_report.pdf
<string>:2: (WARNING/2) Title underline too short.

Parse MDA CLL data file
~~~~~~~~~~~~~
Error reading rst on literate comment line
falling back to plain text
<string>:1: (SEVERE/4) Incomplete section title.

~~~~~~~~
Parse OSU CLL cell line data file
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pyreport",
line 8, in <module>
    load_entry_point('pyreport==0.3.4c', 'console_scripts', 'pyreport')()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreport-0.3.4c-py2.7.egg/pyreport/pyreport.py",
line 57, in commandline_call
    main(pyfile, overrides=options)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreport-0.3.4c-py2.7.egg/pyreport/main.py",
line 1125, in main
    output_list = shape_output_list(output_list, options)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreport-0.3.4c-py2.7.egg/pyreport/main.py",
line 364, in shape_output_list
    output_list = map(check_rst_block, output_list)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyreport-0.3.4c-py2.7.egg/pyreport/main.py",
line 573, in check_rst_block
    publisher.parser, publisher.settings)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 72, in read
    self.parse()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/readers/__init__.py",
line 78, in parse
    self.parser.parse(self.input, document)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py",
line 172, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 170, in run
    input_source=document['source'])
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/statemachine.py",
line 239, in run
    context, state, transitions)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/statemachine.py",
line 460, in check_line
    return method(match, context, next_state)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
line 2919, in text
    line=lineno)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/utils/__init__.py",
line 235, in severe
    return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/utils/__init__.py",
line 193, in system_message
    raise SystemMessage(msg, level)
docutils.utils.SystemMessage: <string>:1: (SEVERE/4) Incomplete section
title.

~~~~~~~~
Parse OSU CLL cell line data file
dhcp-140-254-202-142:Lynn kat$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20140415/ecf92b21/attachment-0001.html>


More information about the Baypiggies mailing list