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

Handle missing attachment key #43

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Conversation

jimgoo
Copy link

@jimgoo jimgoo commented Jul 31, 2022

Fixes this error when opening OutputExamples.ipynb.

 File "/Users/jimgoo/miniconda3/envs/jlab-fork/lib/python3.8/site-packages/jupyter_server_ydoc/ydoc.py", line 249, in maybe_save_document
    if model["content"] != self.room.document.source:
  File "/Users/jimgoo/miniconda3/envs/jlab-fork/lib/python3.8/site-packages/jupyter_ydoc/ydoc.py", line 26, in source
    return self.get()
  File "/Users/jimgoo/miniconda3/envs/jlab-fork/lib/python3.8/site-packages/jupyter_ydoc/ydoc.py", line 140, in get
    if cell["cell_type"] in ["raw", "markdown"] and not cell["attachments"]:
KeyError: 'attachments'

@welcome
Copy link

welcome bot commented Jul 31, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jimgoo !

@davidbrochart davidbrochart merged commit 106ee07 into jupyter-server:main Aug 1, 2022
@welcome
Copy link

welcome bot commented Aug 1, 2022

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@davidbrochart
Copy link
Collaborator

FYI it looks like your git user information is not properly linked to your GitHub account, since you don't appear in contributors.

@jimgoo
Copy link
Author

jimgoo commented Aug 2, 2022

Thanks for the heads up @davidbrochart, I've updated my git account info locally.

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

Successfully merging this pull request may close these issues.

2 participants