<div dir="ltr">ok i figured it out. the idea is that you cannot add any of the #! comments anywhere in your code. <br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Vikram K</b> <span dir="ltr"><<a href="mailto:vikthirtyfive@gmail.com">vikthirtyfive@gmail.com</a>></span><br>
Date: Tue, Apr 15, 2014 at 2:35 PM<br>Subject: Quick question on pyreport<br>To: Baypiggies <<a href="mailto:baypiggies@python.org">baypiggies@python.org</a>><br><br><br><div dir="ltr">Please help! <div><br></div><div>
i am trying to create a report for some work i did using python using the  pyreport module. My report looks something like this:<div><br></div><div>#!Bla bla bla</div><div>#!Bla bla bla</div>
<div>..</div><div>..</div><div><br></div><div><python program></div><div><br></div><div>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.</div>

<div><br></div><div>I am running the program filename.py from the command line of my mac snow leopard computer and using python 2.7.3:</div><div>pyreport filename.py</div><div><br></div><div>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:</div>

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

<div><br></div><div>['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']</div>

<div><br></div><div>Outputing report to /Users/kat/Desktop/PyReport/Lynn/CLL_comparison_report.pdf</div><div><string>:2: (WARNING/2) Title underline too short.</div><div><br></div><div>Parse MDA CLL data file</div>
<div>
~~~~~~~~~~~~~</div><div>Error reading rst on literate comment line </div><div>falling back to plain text</div><div><string>:1: (SEVERE/4) Incomplete section title.</div><div><br></div><div>~~~~~~~~</div><div>Parse OSU CLL cell line data file</div>

<div>Traceback (most recent call last):</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pyreport", line 8, in <module></div><div>    load_entry_point('pyreport==0.3.4c', 'console_scripts', 'pyreport')()</div>

<div>  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</div><div>    main(pyfile, overrides=options)</div>

<div>  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</div><div>    output_list = shape_output_list(output_list, options)</div>

<div>  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</div><div>    output_list = map(check_rst_block, output_list)</div>

<div>  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</div><div>    publisher.parser, publisher.settings)</div>

<div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/readers/__init__.py", line 72, in read</div><div>    self.parse()</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse</div>

<div>    self.parser.parse(self.input, document)</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 172, in parse</div><div>    self.statemachine.run(inputlines, document, inliner=self.inliner)</div>

<div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 170, in run</div><div>    input_source=document['source'])</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run</div>

<div>    context, state, transitions)</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line</div><div>    return method(match, context, next_state)</div>

<div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2919, in text</div><div>    line=lineno)</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/utils/__init__.py", line 235, in severe</div>

<div>    return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)</div><div>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docutils/utils/__init__.py", line 193, in system_message</div>

<div>    raise SystemMessage(msg, level)</div><div>docutils.utils.SystemMessage: <string>:1: (SEVERE/4) Incomplete section title.</div><div><br></div><div>~~~~~~~~</div><div>Parse OSU CLL cell line data file</div><div>

dhcp-140-254-202-142:Lynn kat$ </div></div><div><br></div><div><br></div></div></div></div>
</div><br></div>