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

Code not shown in case of exceptions #9

Open
lgarcin opened this issue Sep 10, 2017 · 3 comments
Open

Code not shown in case of exceptions #9

lgarcin opened this issue Sep 10, 2017 · 3 comments

Comments

@lgarcin
Copy link

lgarcin commented Sep 10, 2017

When an exception is thrown, the code is not shown at all. This occurs in .. runblock:: pyconblocks.

For example

.. runblock:: pycon

    >>> s = (1, 2, 3)
    >>> s[0] = 4

produces


Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment

whereas I'd like to get

>>> s = (1, 2, 3)
>>> s[0] = 4
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment

Is there a way to achieve this ?

@WhyNotHugo
Copy link
Owner

WhyNotHugo commented Sep 10, 2017

It's definitely possible, not sure how trivial it is.
I can't promise anything anytime soon.

@leezu
Copy link

leezu commented Nov 23, 2018

The same seems to apply when the code raises some warning

@endrebak
Copy link
Contributor

I have started using rbookdown with the python/reticulate directive instead for generating docs with snippets/output.

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

No branches or pull requests

4 participants