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

Traceback, motion_notify #23

Closed
quozl opened this issue Dec 30, 2018 · 6 comments · Fixed by #30
Closed

Traceback, motion_notify #23

quozl opened this issue Dec 30, 2018 · 6 comments · Fixed by #30

Comments

@quozl
Copy link
Contributor

quozl commented Dec 30, 2018

1546209128.190513 WARNING root: icon_size is deprecated. Use pixel_size instead.
1546209128.192004 WARNING root: icon_size is deprecated. Use pixel_size instead.
Traceback (most recent call last):
  File "/usr/share/sugar/activities/InfoSlicer.activity/infoslicer/widgets/Readonly_Textbox.py", line 131, in motion_notify
    if mouseiter.compare(self.selectionstart) == 1:
AttributeError: 'bool' object has no attribute 'compare'
Traceback (most recent call last):
  File "/usr/share/sugar/activities/InfoSlicer.activity/infoslicer/widgets/Readonly_Textbox.py", line 131, in motion_notify
    if mouseiter.compare(self.selectionstart) == 1:
AttributeError: 'bool' object has no attribute 'compare'

@IamRaviTejaG
Copy link

IamRaviTejaG commented Jan 1, 2019

@quozl .compare is a method from which of the imported modules? Is it okay to change the code to

if mouseiter == self.selectionstart:

instead?

@quozl
Copy link
Contributor Author

quozl commented Jan 1, 2019

Thanks for looking at this. I haven't looked at the problem; if I did, I would have fixed it. But given the error "object has no attribute", your suggestion doesn't resemble any patch I've seen for the last ten years. So just as a wild guess, and again, without my looking at the code, consider for yourself if mouseiter always has the expected object type, and ask why would we call a method compare on an object of type bool. The latter question perhaps rhetorical. Answering those questions for yourself will probably lead to better understanding, and then to a solution. Let us know if you can't progress with that.

@Aniket21mathur
Copy link
Contributor

image
@ImRaviTejaG the error is probably caused if False is returned from get_mouse_iter().So one of the possible solution is to modify the code in Readonly_Textbox.py to keep a check for this condition(if False is returned instead of "mouseClickPositionIter").Thanks!

@quozl
Copy link
Contributor Author

quozl commented Jan 3, 2019

Why is False returned by get_mouse_iter()?

@Aniket21mathur
Copy link
Contributor

@quozl Can you please tell how to reproduce this error? I can make any further comments only after knowing how the error is actually produced?
Thanks!

@quozl
Copy link
Contributor Author

quozl commented Jan 6, 2019

No, I don't know how it was produced. I used the activity features a few times. Then when I looked at the log, I found the error. You might look at the traceback to find what feature was being used. In particular look at the functions and line numbers in the stack above the point of failure. For each line of code, deduce the intention and test all assumptions.

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 a pull request may close this issue.

3 participants