Skip to content

Using python within Rmd doesn't return full stack trace #12

Description

@thomasyu888

This makes it really difficult to debug code. For instance, when running a python chunk in Rmd:

code here
# you only get the error, but not where the error occurs
TypeError: string indices must be integers

While when running the code in jupyter or just python

code here
# full stacktrace
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-10-d719daee2b43> in <module>
      3                  annotation_store_id= "test",
      4                  annotations = annotation,
----> 5                  delete_existing_annotations = False)

~/anaconda3/envs/nlp-client/lib/python3.7/site-packages/nlpsandboxclient/client.py in store_annotations(host, dataset_id, annotation_store_id, annotations, delete_existing_annotations)
    641     for annotation in annotations:
    642         annotation_id = annotation[
--> 643             'annotationSource'
    644         ]['resourceSource']['name'].split("/")[-1]
    645         _store_annotation(

TypeError: string indices must be integers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions