Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in "image" directive when using procedures #10

Open
andrewchou34 opened this issue Aug 13, 2014 · 0 comments
Open

Error in "image" directive when using procedures #10

andrewchou34 opened this issue Aug 13, 2014 · 0 comments

Comments

@andrewchou34
Copy link

When I run the snippet, I get the following error. Calling a print statement after pylab.show seems to cause an issue. I would appreciate any workarounds. Thanks!

#!/usr/bin/env python
from pylab import *

def foo1():
    print "hello"
    figure()
    plot([1,2,3])
    show()

def foo2():
    print "hello2"
    figure()
    plot([2,3,4])
    show()

def bar():
    foo1()
    foo2()

bar()
andrewchou:rnd andrewchou$ pyenv/bin/pyreport -t html src-scripts/factor-mom/test.py
Running python script /Users/andrewchou/dev/rnd/src-scripts/factor-mom/test.py:

hello
Here goes figure test_pyreport_0.png
hello2
Here goes figure test_pyreport_1.png

Outputing report to /Users/andrewchou/dev/rnd/src-scripts/factor-mom/test.html
<string>:50: (ERROR/3) Error in "image" directive:
no content permitted.

.. image:: test_pyreport_0.png

    hello2


Ran script in 0.46s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant