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

KeyError: 'type' #924

Open
Saumya-Mishra9129 opened this issue Jun 8, 2020 · 4 comments
Open

KeyError: 'type' #924

Saumya-Mishra9129 opened this issue Jun 8, 2020 · 4 comments

Comments

@Saumya-Mishra9129
Copy link
Member

Tested on Pippy with Sugar 0.117 and with Ubuntu 20.04

Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/jarabe/model/neighborhood.py", line 1035, in __activity_updated_cb
       bundle = registry.get_bundle(properties['type'])
KeyError:  'type'

How to reproduce - Open Pippy, click on neighborhood icon to share with other user, close pippy, check shell.log.

@quozl
Copy link
Contributor

quozl commented Jun 15, 2020

Does not reproduce for me with Sugar 0.117 on Ubuntu 20.04, so there may be something unique about the configuration or execution environment.

Purpose of the callback is to update the neighbourhood view to show that an activity that was not shared is now shared. The icon is to appear in the view.

Speculating can be wasteful, but my best guess is that you're using a virtual machine, with multiple virtual CPU cores or threads, and that the change to GObject properties of the activity is being asynchronously delivered by D-Bus, such that there isn't even a type key (content bundle or activity bundle) for a short time. If so, debug by adding instrumentation (log the properties keys) or a breakpoint.

@Saumya-Mishra9129
Copy link
Member Author

Speculating can be wasteful, but my best guess is that you're using a virtual machine, with multiple virtual CPU cores or threads, and that the change to GObject properties of the activity is being asynchronously delivered by D-Bus, such that there isn't even a type key (content bundle or activity bundle) for a short time.

Have you tested with Native Sugar? If so then , It can be related to Virtual machine.

@quozl
Copy link
Contributor

quozl commented Jun 17, 2020

Yes, I'm testing with laptops, not virtual machines. My speculation would be easy for you to test, have you tried that yet?

@Saumya-Mishra9129
Copy link
Member Author

Yes, I'm testing with laptops, not virtual machines. My speculation would be easy for you to test, have you tried that yet?

I have tried it as you said. I have tried logging the properties key. No key is present at the time this section of code runs. It seems you were correct.

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

2 participants