-
Notifications
You must be signed in to change notification settings - Fork 7
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
Python3 and other fixes #11
Conversation
… after python 3.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can demote logging instead of removing them entirely, you can demote to debug
.
Thanks, reviewed 00e5df3. |
@chimosky changed as suggested! |
@Hrishi1999, is further work on AnalyzeJournal compatible with your plan for dashboard? Or is there something you can use here? |
Tested, reviewed. Thanks. In 1f1bb36, I think using Is there a particular reason why you used The object chooser created by the Logs show this error.
|
@quozl The Dashboard Activity was supposed to be an extension of AnalyzeJournal integrated with Sugar's Journal. Dashboard does use sugarpycha, but the version of sugarpycha in Dashboard is already in python3. In future, to avoid conflicts, Dashboard can use AnalyzeJournal's sugarpycha version as a submodule or vice-versa. |
Thanks for testing :)
I saw chart activity used sugarpycha which was using collections.Callable instead of builtin callable when it was ported to python3 , so I just used it to maintain similarity in the code of sugarpycha
Yes, I agree with you. Except for making the code more readable it isn't much of a difference. I will make the change if changes to AnalyzeJournal are compatible. Should I go ahead with changes @quozl @chimosky ?
Doesn't
Sorry, I didn't consider that as an error. It was a warning I didn't know the cause of. Any suggestions what might have caused it / what could probably fix it ? |
Tested, 1f1bb36 |
Sorry, my question must have been a bit too vague. What I'm saying is that we seem to have two parallel developments to choose from; either a Dashboard in Sugar, or the AnalyzeJournal activity being ported to Python 3 so it can be used in Sugar again. I'm fine with competition to choose the best solution, but would it be more effective to bring the AnalyzeJournal features into the draft Dashboard feature, or to take some of the draft Dashboard features and bring them into AnalyzeJournal? |
Sorry, it seems my last answer wasn't focused on the question. I would like the features to be ported to Dashboard instead since it is going to be integrated with the Journal. But there are some features in AnalyzeJournal which may not make sense if we implement in the Dashboard. |
I agree with @Hrishi1999, some features of |
Tested again and the issue no longer persists, when I said "doesn't have focus" I meant when the button is clicked, the object chooser window didn't come up like it's supposed to but came up behind the activity canvas and was only visible when the activity was closed.
Yes it doesn't make any functional difference, my earlier comment was for readability.
The warning is caused when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tables might not be evenly spaced. On launching the activity. it looks like this
These are the tracebacks I got
I guess @quozl mentioned some of the errors previously Nvm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1586012753.417484 WARNING root: No icon with the name line was found in the theme.
1586012753.426675 WARNING root: No icon with the name line was found in the theme.
@JuiP I had a quick review of code and found that the code first when written thought to implement line chart of Sugarpycha also along with pie, vbar and hbar. As look at charts.py Line 121 and activity.py line 483.. But not adding line chart in activity.py causing the error as seen by @srevinsaju and above mentioned error also. Thanks :)
Reviewed again 4d4eb12, when we click on Read Turtle Data button, Object chooser window doesnt appear in front , it is behind of canvas window thats why we are not able to see that time and when we click on stop button we can see object chooser window , it means it was hidden. |
Hey @Saumya-Mishra9129, can you please tell me how did you get that error? I have nothing in my logs, also do this error also occur when you test master? |
I tested 4d4eb12. |
Interesting results. Seems like the bug for Objectchooser is unfixed, hinting it might be a bug in the call of ObjectChooser in the code. (Please verify the signature of the functions have been / not been changed over) Simple reproducer:
|
Well that's weird, it isn't fixed for me and Saumya. Before 4d4eb12, it was fixed for me. @srevinsaju please tell me your test method for getting the error. |
See #11 (comment) |
To get the To get the IndexError, you have to click
@JuiP, is your logging system alright?
See the coverage guide in sugar-docs |
I think the coverage is low because I can't test the Turtle file as the object chooser appears behind the window. I have tried clicking all sorts of buttons, and saving each graph as image.
I am running from within the sugar-desktop terminal with command sugar-activity3, I tried doing what you displayed in the images, tried read Freespace Data and save as image. I did not get the tracebacks. The image is saved as png in my journal. I don't understand why is there a difference when testing. I am using a debian build (If that helps) |
@JuiP I am unable to save a png of the graph for some reason. I might have been suspicious if the error I had received might be because of something wrong with my system; but as @Saumya-Mishra9129 were also able to reproduce it (1) here, so I was quite suspicious if something had gone wrong during the Port Regarding #11 (comment), I can confirm that this is a bug which possibly happened due to python3 port (I have removed all of python2 from my system, so can't test An immediate correction on https://github.com/JuiP/AnalyzeJournal/blob/python3/activity.py#L573-L576 would be to add another Exeception catch change this try:
_iter = self.model.insert(path, [label, value])
except ValueError:
_iter = self.model.append([label, str(value)]) to try:
_iter = self.model.insert(path, [label, value])
except (ValueError, TypeError):
_iter = self.model.append([label, str(value)]) In the long run, you might need to find the fix for why it actually comes out as I am not sure, however of this error and the ObjectChooser Error by simply looking at code, (might need to debug and compare other upstream activities to see what makes them work, and not this) |
Tested 4d4eb12. I couldn't seem to reproduce the tracebacks provided by @Saumya-Mishra9129 and @srevinsaju. One weird thing to notice is that ObjectChooser only worked once for me, after rebooting the system, it was only visible when the activity is closed. |
I am not getting this error as mentioned by @srevinsaju , but I am getting index error. |
@Saumya-Mishra9129 I were talking about IndexError I have two errors:
|
@Saumya-Mishra9129 You will have to test this patch for me before I add it to the commit because I am unable to reproduce the traceback. I'm not sure why, but logically if this fixes it then I should have got the traceback too 😕
Yes, that could be the most intuitive way to fix it but I'll wait till I find out the cause, because none of us seem to get this error in the logs. @srevinsaju |
@JuiP I tested it, working fine not getting index error anymore. |
rm -r ~/.sugar fixed my problem 🤣 |
The problem isn't from the toolkit, you should specify the
@srevinsaju You don't need to have sugar in DEBUG mode to see logs.
You should run the activity from the activity ring as that's how a user would run it and not from the terminal. |
- Fixes index error : reported by @Saumya-Mishra9129 and @srevinsaju - Fixed : Object Chooser focus
Thanks for the hint @chimosky ! Fixed it in ef16be6
I have actually taken care of it by exception handling in c02848e. It does the same thing :)
Sorry, I didn't make myself clear. I do run the activity from the ring and from the terminal (to test coverage or test just minor code changes) I tested this activity, works perfectly for me @srevinsaju @Saumya-Mishra9129 @Hrishi1999 please review and test. Thanks :) If it's approved by all then maybe this PR is good to merge? :) @chimosky @quozl ? |
- Removed chooser = None assignment - Removed what_filter kwarg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed.
- fixed unnecessary capitalization and typos in README.md - Use _logger instead of calling the module - Change back the wording in charthelp.py - Used stat.f_blocks and f_bavail ... instead of indexing method
Tested
Errors- none
@chimosky @quozl Please test, review and merge :)