Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities
Thanks. Updated steps for releasing https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#checklist---maintainer On Fri, Feb 16, 2024 at 11:44:47PM -0600, James Simmons wrote: > It turned out to be fairly simple to fix the Read Activity. It was complaining > that it had no MICRO_VERSION attribute in the EvinceDocument object, so I just > removed it from the _validate_min_version() method in evinceadapter.py: > > def update_toc(self, activity): > > if self._validate_min_version(3, 5): > > # check version because does not work and crash with older evince > > doc = self._model.get_document() > > if not doc.has_document_links(): > > logging.error('The pdf file does not have a index') > > return False > > else: > > self._job_links = EvinceView.JobLinks.new(document=doc) > > self._job_links.connect('finished', self.__index_loaded_cb, > > activity) > > EvinceView.Job.scheduler_push_job( > > self._job_links, > > EvinceView.JobPriority.PRIORITY_NONE) > > return True > > else: > > return False > > def handle_link(self, link): > > self._view.handle_link(link) > > def _validate_min_version(self, major, minor): > > """ > > Check if Evince version is at major or equal than the requested > > """ > > evince_version = [EvinceDocument.MAJOR_VERSION, > > EvinceDocument.MINOR_VERSION] > > return evince_version >= [major, minor] > > Now it works. > > I was getting the same error from the version of Read Activity that shipped > with Fedora 39. > > I made a pull request for Get IA Books. It looks like I can do the merge > myself. Not sure of what the procedure is to get the revised Activity > published. > > James Simmons > > On Fri, Feb 16, 2024 at 5:47 PM James Cameron <[1]qu...@laptop.org> wrote: > > Thanks. What about the activity provided by Fedora 39? > > On Fri, Feb 16, 2024 at 05:28:35PM -0600, James Simmons wrote: > > I just confirmed that the master branch of the Read Activity has this > problem > > with Evince when running on Fedora 39: > > > > Traceback (most recent call last): > > File "/usr/bin/sugar-activity3", line 5, in > > activityinstance.main() > > File "/usr/lib/python3.12/site-packages/sugar3/activity/ > activityinstance.py", > > line 230, in main > > instance = create_activity_instance(activity_constructor, > activity_handle) > > > ^^ > ^ > > File "/usr/lib/python3.12/site-packages/sugar3/activity/ > activityinstance.py", > > line 59, in create_activity_instance > > activity = constructor(handle) > > ^^^ > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 374, > in > > __init__ > > self.read_file(self._jobject.file_path) > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 747, > in > > read_file > > self._load_document('file://' + tempfile) > > File "/home/jamessimmons/git/read-activity/readactivity.py", line > 1054, > in > > _load_document > > self._update_toc() > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 627, > in > > _update_toc > > if self._view.update_toc(self): > > ^^^ > > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line > 275, > in > > update_toc > > if self._validate_min_version(3, 5, 92): > > > > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line > 301, > in > > _validate_min_version > > EvinceDocument.MICRO_VERSION] > > > > File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in > > __getattr__ > > raise AttributeError("%r object has no attribute %r" % ( > > AttributeError: 'gi.repository.EvinceDocument' object has no attribute > > 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'? > > Exited with status 1, pid 106639 activity_id > > 37db76336c5474c61078f525c28c1f9de48fab9a > > > > James Simmons > > > > On Fri, Feb 16, 2024 at 4:09 PM James Simmons <[1][2]nices...@gmail.com> > wrote: > > > > James, > > > > I'm using Fedora 39, a fresh install on a computer I just got and an > older > > one I'm giving away. I'm using the version of Read that ships with > Fedora. > > I just checked out the master branch of Read from Git and could run > a > > python 3 setup.py dev on it to see if that version has the problem. > I > won't > > be able to do that right away, but when I do I'll let you know if it > works. > > > > James Simmons > > > > On Fri, Feb 16, 2024 at 3:42 PM James Cameron > <[2][3]qu...@laptop.org > > wrote: > > > >
Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities
It turned out to be fairly simple to fix the Read Activity. It was complaining that it had no MICRO_VERSION attribute in the EvinceDocument object, so I just removed it from the _validate_min_version() method in evinceadapter.py: def update_toc(self, activity): if self._validate_min_version(3, 5): # check version because does not work and crash with older evince doc = self._model.get_document() if not doc.has_document_links(): logging.error('The pdf file does not have a index') return False else: self._job_links = EvinceView.JobLinks.new(document=doc) self._job_links.connect('finished', self.__index_loaded_cb, activity) EvinceView.Job.scheduler_push_job( self._job_links, EvinceView.JobPriority.PRIORITY_NONE) return True else: return False def handle_link(self, link): self._view.handle_link(link) def _validate_min_version(self, major, minor): """ Check if Evince version is at major or equal than the requested """ evince_version = [EvinceDocument.MAJOR_VERSION, EvinceDocument.MINOR_VERSION] return evince_version >= [major, minor] Now it works. I was getting the same error from the version of Read Activity that shipped with Fedora 39. I made a pull request for Get IA Books. It looks like I can do the merge myself. Not sure of what the procedure is to get the revised Activity published. James Simmons On Fri, Feb 16, 2024 at 5:47 PM James Cameron wrote: > Thanks. What about the activity provided by Fedora 39? > > On Fri, Feb 16, 2024 at 05:28:35PM -0600, James Simmons wrote: > > I just confirmed that the master branch of the Read Activity has this > problem > > with Evince when running on Fedora 39: > > > > Traceback (most recent call last): > > File "/usr/bin/sugar-activity3", line 5, in > > activityinstance.main() > > File > "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", > > line 230, in main > > instance = create_activity_instance(activity_constructor, > activity_handle) > > > ^^^ > > File > "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", > > line 59, in create_activity_instance > > activity = constructor(handle) > >^^^ > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 374, > in > > __init__ > > self.read_file(self._jobject.file_path) > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 747, > in > > read_file > > self._load_document('file://' + tempfile) > > File "/home/jamessimmons/git/read-activity/readactivity.py", line > 1054, in > > _load_document > > self._update_toc() > > File "/home/jamessimmons/git/read-activity/readactivity.py", line 627, > in > > _update_toc > > if self._view.update_toc(self): > >^^^ > > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line > 275, in > > update_toc > > if self._validate_min_version(3, 5, 92): > > > > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line > 301, in > > _validate_min_version > > EvinceDocument.MICRO_VERSION] > > > > File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in > > __getattr__ > > raise AttributeError("%r object has no attribute %r" % ( > > AttributeError: 'gi.repository.EvinceDocument' object has no attribute > > 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'? > > Exited with status 1, pid 106639 activity_id > > 37db76336c5474c61078f525c28c1f9de48fab9a > > > > James Simmons > > > > On Fri, Feb 16, 2024 at 4:09 PM James Simmons <[1]nices...@gmail.com> > wrote: > > > > James, > > > > I'm using Fedora 39, a fresh install on a computer I just got and an > older > > one I'm giving away. I'm using the version of Read that ships with > Fedora. > > I just checked out the master branch of Read from Git and could run a > > python 3 setup.py dev on it to see if that version has the problem. > I won't > > be able to do that right away, but when I do I'll let you know if it > works. > > > > James Simmons > > > > On Fri, Feb 16, 2024 at 3:42 PM James Cameron <[2]qu...@laptop.org> > wrote: > > > > That's surprising. Thought we fixed that. > > > > What Linux distribution and release are you doing this on? > > > > On Fri, Feb 16, 2024 at 02:23:11PM -0600, James Simmons wrote: > > > James, > > > > > > I don't want to use Evince as part of Get IA Books. It is the > Read > > Activity > > > itself that has a problem. > > > > > > When I tested opening books from the Journal the Read Activity > would > > not start. > > > I thought the problem might be in the way Get IA Books was > adding > > books to the > > > Journal, so as a sanity check I used the Browse activity to > download > >
Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities
Thanks. What about the activity provided by Fedora 39? On Fri, Feb 16, 2024 at 05:28:35PM -0600, James Simmons wrote: > I just confirmed that the master branch of the Read Activity has this problem > with Evince when running on Fedora 39: > > Traceback (most recent call last): > File "/usr/bin/sugar-activity3", line 5, in > activityinstance.main() > File > "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", > line 230, in main > instance = create_activity_instance(activity_constructor, activity_handle) > ^^^ > File > "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", > line 59, in create_activity_instance > activity = constructor(handle) > ^^^ > File "/home/jamessimmons/git/read-activity/readactivity.py", line 374, in > __init__ > self.read_file(self._jobject.file_path) > File "/home/jamessimmons/git/read-activity/readactivity.py", line 747, in > read_file > self._load_document('file://' + tempfile) > File "/home/jamessimmons/git/read-activity/readactivity.py", line 1054, in > _load_document > self._update_toc() > File "/home/jamessimmons/git/read-activity/readactivity.py", line 627, in > _update_toc > if self._view.update_toc(self): > ^^^ > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 275, in > update_toc > if self._validate_min_version(3, 5, 92): > > File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 301, in > _validate_min_version > EvinceDocument.MICRO_VERSION] > > File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in > __getattr__ > raise AttributeError("%r object has no attribute %r" % ( > AttributeError: 'gi.repository.EvinceDocument' object has no attribute > 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'? > Exited with status 1, pid 106639 activity_id > 37db76336c5474c61078f525c28c1f9de48fab9a > > James Simmons > > On Fri, Feb 16, 2024 at 4:09 PM James Simmons <[1]nices...@gmail.com> wrote: > > James, > > I'm using Fedora 39, a fresh install on a computer I just got and an older > one I'm giving away. I'm using the version of Read that ships with Fedora. > I just checked out the master branch of Read from Git and could run a > python 3 setup.py dev on it to see if that version has the problem. I > won't > be able to do that right away, but when I do I'll let you know if it > works. > > James Simmons > > On Fri, Feb 16, 2024 at 3:42 PM James Cameron <[2]qu...@laptop.org> wrote: > > That's surprising. Thought we fixed that. > > What Linux distribution and release are you doing this on? > > On Fri, Feb 16, 2024 at 02:23:11PM -0600, James Simmons wrote: > > James, > > > > I don't want to use Evince as part of Get IA Books. It is the Read > Activity > > itself that has a problem. > > > > When I tested opening books from the Journal the Read Activity would > not start. > > I thought the problem might be in the way Get IA Books was adding > books to the > > Journal, so as a sanity check I used the Browse activity to download > some PDFs > > to the Journal and also downloaded one EPUB. The Read Activity > opened > the EPUB > > just fine but not the PDFs. There was a stack trace (copied to an > earlier > > email) that made it look like the code Evince needs to interface > with > Python > > has changed. It was complaining about an Evince micro version > number. > That was > > the thing I wanted to look at in the Read Activity. > > > > I'll probably send an email to the wider group explaining the issue. > > > > Thanks. > > > > James Simmons > > > > On Fri, Feb 16, 2024 at 2:01 PM James Cameron > <[1][3]qu...@laptop.org > > wrote: > > > > There's also VScode and GitHub desktop if you want to try other > > methods. It is difficult to keep up with GitHub's security > posture > > lately. > > > > The Read activity has the integration with Evince. If you want > your > > activity to show PDF inside it, rather than activate Read, then > borrow > > code from Read. > > > > By the way, you're using our membership team alias, which is > just > > Alex, myself, and Ibiam. If you'd like wider and public > readership, > > there's the sugar-devel@ mailing list. > > > > [2][4]http://lists.sugarlabs.org/listinfo/sugar-devel > > > > On Fri, Feb
Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities
I just confirmed that the master branch of the Read Activity has this problem with Evince when running on Fedora 39: Traceback (most recent call last): File "/usr/bin/sugar-activity3", line 5, in activityinstance.main() File "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", line 230, in main instance = create_activity_instance(activity_constructor, activity_handle) ^^^ File "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py", line 59, in create_activity_instance activity = constructor(handle) ^^^ File "/home/jamessimmons/git/read-activity/readactivity.py", line 374, in __init__ self.read_file(self._jobject.file_path) File "/home/jamessimmons/git/read-activity/readactivity.py", line 747, in read_file self._load_document('file://' + tempfile) File "/home/jamessimmons/git/read-activity/readactivity.py", line 1054, in _load_document self._update_toc() File "/home/jamessimmons/git/read-activity/readactivity.py", line 627, in _update_toc if self._view.update_toc(self): ^^^ File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 275, in update_toc if self._validate_min_version(3, 5, 92): File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 301, in _validate_min_version EvinceDocument.MICRO_VERSION] File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in __getattr__ raise AttributeError("%r object has no attribute %r" % ( AttributeError: 'gi.repository.EvinceDocument' object has no attribute 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'? Exited with status 1, pid 106639 activity_id 37db76336c5474c61078f525c28c1f9de48fab9a James Simmons On Fri, Feb 16, 2024 at 4:09 PM James Simmons wrote: > James, > > I'm using Fedora 39, a fresh install on a computer I just got and an older > one I'm giving away. I'm using the version of Read that ships with Fedora. > I just checked out the master branch of Read from Git and could run a > python 3 setup.py dev on it to see if that version has the problem. I won't > be able to do that right away, but when I do I'll let you know if it works. > > James Simmons > > On Fri, Feb 16, 2024 at 3:42 PM James Cameron wrote: > >> That's surprising. Thought we fixed that. >> >> What Linux distribution and release are you doing this on? >> >> On Fri, Feb 16, 2024 at 02:23:11PM -0600, James Simmons wrote: >> > James, >> > >> > I don't want to use Evince as part of Get IA Books. It is the Read >> Activity >> > itself that has a problem. >> > >> > When I tested opening books from the Journal the Read Activity would >> not start. >> > I thought the problem might be in the way Get IA Books was adding books >> to the >> > Journal, so as a sanity check I used the Browse activity to download >> some PDFs >> > to the Journal and also downloaded one EPUB. The Read Activity opened >> the EPUB >> > just fine but not the PDFs. There was a stack trace (copied to an >> earlier >> > email) that made it look like the code Evince needs to interface with >> Python >> > has changed. It was complaining about an Evince micro version number. >> That was >> > the thing I wanted to look at in the Read Activity. >> > >> > I'll probably send an email to the wider group explaining the issue. >> > >> > Thanks. >> > >> > James Simmons >> > >> > On Fri, Feb 16, 2024 at 2:01 PM James Cameron <[1]qu...@laptop.org> >> wrote: >> > >> > There's also VScode and GitHub desktop if you want to try other >> > methods. It is difficult to keep up with GitHub's security posture >> > lately. >> > >> > The Read activity has the integration with Evince. If you want your >> > activity to show PDF inside it, rather than activate Read, then >> borrow >> > code from Read. >> > >> > By the way, you're using our membership team alias, which is just >> > Alex, myself, and Ibiam. If you'd like wider and public readership, >> > there's the sugar-devel@ mailing list. >> > >> > [2]http://lists.sugarlabs.org/listinfo/sugar-devel >> > >> > On Fri, Feb 16, 2024 at 08:03:20AM -0600, James Simmons wrote: >> > > Ibiam, >> > > >> > > I think the problem is I need to use a Personal Access Token with >> > Eclipse. >> > > Somehow it worked with my regular password from Windows at work >> but it >> > was >> > > rejected when I used the command line at home from Linux. I had >> to use >> > the PAT >> > > instead of the regular password. >> > > >> > > I'm going to try to get the Read Activity working with Evince. I >> won't >> > need Git >> > > update permission unless I actually succeed. >> > > >> > > James Simmons >> > > >> > > On Fri, Feb 16, 2024 at 7:40 AM Chihurumnaya Ibiam <[1][3] >> >