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
Fixes #4
Fixes #4
Conversation
|
Tested, haven't reviewed. I don't really notice anything when I click on undo or redo. I get the following traceback when I click on undo, then on redo (once undo button has been disabled) The paste button seems to paste text from the clipboard to the "Cloud Text". The copy button, however, doesn't copy the "Cloud Text" |
Notice
For Redo I had assumed the user will create a |
|
Tested. No issues now. |
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.
Tested 13bafe5 on Ubuntu 20.04. Failed to generate a new word cloud;
$ sugar-activity3
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/usr/share/sugar/activities/WordCloud.activity/activity.py", line 379, in _create_image
subprocess.check_call(
File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/sugar/activities/WordCloud.activity/wordcloud.py'
$
Because there is no such file /usr/bin/python on Ubuntu 20.04.
|
Thanks. Tested 9ee9b2f on Ubuntu 20.04. Failed to generate a new word cloud, same stack trace. |
|
@JuiP the text doesn't get copied to the clipboard as |
|
I think that is likely; just test it and see? Write a short program that calls another short program using subprocess module, and set the first line to something that doesn't exist, like /usr/bin/pythonmissing If the theory is correct, you'll see a near-identical traceback. |
|
Tried fixing it in c8bffd4. From what I have found, Ubuntu 20.04 only has python3 installed by default. So, I also changed |
Reviewed c8bffd4, thanks. Using |
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.
Tested on ubuntu 20.04, I haven't get this one error.
Tried fixing it in c8bffd4. From what I have found, Ubuntu 20.04 only has python3 installed by default. So, /usr/bin/python cannot be used.
I also changed #!/usr/bin/python to #! /usr/bin/env python3 , so if the user has several versions of Python installed, /usr/bin/env will ensure the interpreter used is the first one on the user environment's $PATH. The alternative would be to hardcode something like #!/usr/bin/python3. But that is less flexible.
This is kind of new info for me. Lets see if it fixes https://github.com/sugarlabs/sugar-toolkit-gtk3/issues/441.
However I found errors in log while creating cloud, there are errors along with MEMORY ERROR.
Great!
Thanks! @Saumya-Mishra9129 ... Just realized the error you got was due to an incomplete python3 port. I have fixed it. Also, this time while testing I got |
Yeah, I also searched about it. You can use Gdk.Monitor class for same as per doc https://lazka.github.io/pgi-docs/Gdk-3.0/classes/Monitor.html#Gdk.Monitor.get_scale_factor. But I don't think we need to fix that because its deprecated in Gdk 3.22 , it is not removed , we can still use Gdk.Screen because we have used it in several activities also.
Checked didn't get error now. It is fixed , but its different from sugarlabs/sugar-toolkit-gtk3#441 , I checked same thing you said in findwords activity , It didnt work there. |
|
@JuiP said
I agree with @Saumya-Mishra9129, you'll get a warning that it's deprecated but it still exists and hasn't been removed yet so you can keep using it. |
|
If @quozl approves the changes and confirms there aren't anymore errors, maybe I could go ahead with the changes for making a release? The activity has been ported to python3 after the last release, so I guess we can have this activity released? |
efb99de
to
adfa6a7
Compare
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
Did some changes and released the last python2 version, also resolved conflicts on this branch. |
|
Updated my local branch with current changes! |
|
Thanks. Tested 3a6dcfb on Ubuntu 20.04.
|
|
@quozl I'll look into the issues you mentioned and get back,
Should we just ignore the warning, like suggested by @chimosky and @Saumya-Mishra9129 in their comments? (here and here) |
My opinion is;
However, in most activities that use Gdk.Screen in this way they do so in order to avoid having to wait for the main window to be realised, and are assuming that the main window will take up the whole screen because of Sugar's window manager configuration. Instead, activities should be coded to get the dimensions of the main window, and that way they will be independent of Sugar's window manager. |
Activity was designed for 4:3 aspect ratio. Change code implementation to inclue all ratios (like 16:9 or other)
@quozl I guess your speculation is correct. I tried setting |
/usr/share/sugar/activities/wordcloud.activity/wordcloud.py:109: DeprecationWarning: Gdk.Screen.height is deprecated if Gdk.Screen.height() < Gdk.Screen.width():
|
@quozl @chimosky @srevinsaju Kindly test, review and merge? |
Can you fix it then? You can find the CSS files in the sugar-artwork repository. |
|
Reviewed, thanks. |

Undo and Redo buttons were hidden. Implemented methods such that the buttons are set sensitive only when required. For now one can only undo and redo one step at a time.
I don't know how exactly paste and copy buttons work. If not required should either be hidden / removed.
@quozl @chimosky Please test and review :)