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

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

Open
thomasyu888 opened this issue Oct 22, 2021 · 0 comments
Open

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

thomasyu888 opened this issue Oct 22, 2021 · 0 comments

Comments

@thomasyu888
Copy link
Member

thomasyu888 commented Oct 22, 2021

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
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