Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2022, 07:12 PM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,872
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Issues with checkpoints in Sigil 1.9.20

I don't know if is an issue of Sigil but when I want to create a checkpoint, I receive the following message:

Code:
Traceback (most recent call last):

  File "/usr/share/sigil/python3lib/repomanager.py", line 493, in performCommit
    tags = porcelain.list_tags(repo='.')

AttributeError: module 'dulwich.porcelain' has no attribute 'list_tags'
And when I want to make a restore from a previous checkpoint, I receive the following:

Code:
Traceback (most recent call last):

  File "/usr/share/sigil/python3lib/repomanager.py", line 405, in generate_epub_from_tag
    tags = porcelain.list_tags(repo='.')

AttributeError: module 'dulwich.porcelain' has no attribute 'list_tags'
I'm working under Arch Linux.
RbnJrg is offline   Reply With Quote
Old 09-18-2022, 07:36 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
My guess is that Dulwich dropped the undocumented list_tags in a recent version. That, of course, epically sucks.
DiapDealer is offline   Reply With Quote
Advert
Old 09-18-2022, 07:45 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Looks like list_tags has been deprecated for a bit (in favor of tag_list). It was dropped sometime after 0.20.44.

Until we release a fixed version, your only option is to roll back your dulwich version to 0.20.44 or earlier. I'm guessing dulwich 0.20.45 is probably OK as well, but I haven't checked. But since 0.20.46 was released 12 days ago, it's the likely culprit (EDIT: confirmed).

It's, of course, rather uncool of them to remove working functions in such a minor version update.

https://github.com/jelmer/dulwich/co...66baefb44be532

Last edited by DiapDealer; 09-18-2022 at 08:07 PM.
DiapDealer is offline   Reply With Quote
Old 09-18-2022, 08:41 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,011
Karma: 6361444
Join Date: Nov 2009
Device: many
Yes that sucks. I wonder how far back its replacement tag_list support was added?
KevinH is offline   Reply With Quote
Old 09-18-2022, 08:43 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Try this on for size...

If you build your own Sigil, replace /usr/local/share/sigil/python3lib/repomanager.py with the repomanager.py attached to his post. If you use the Sigil from the pacman repos, the file to replace will be /usr/share/sigil/python3lib/repomanager.py. If it works, that should hold you until the official fix is released.

It's working for me with both pre- and post dulwich 0.20.46.
Attached Files
File Type: py repomanager.py (25.3 KB, 236 views)
DiapDealer is offline   Reply With Quote
Advert
Old 09-18-2022, 08:45 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Yes that sucks. I wonder how far back its replacement tag_list support was added?
I gave up looking. The updated repomanager.py file I attached in my previous post seems to do the trick, but if you want to do something else, that's fine with me. Instead of checking the version, we could simply catch list_tags import errors and return tag_list instead.
DiapDealer is offline   Reply With Quote
Old 09-18-2022, 08:47 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
We should probably run through all the Dulwich pieces we use and make sure nothing else is in danger of being dumped.
DiapDealer is offline   Reply With Quote
Old 09-18-2022, 08:50 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,011
Karma: 6361444
Join Date: Nov 2009
Device: many
Since it works in both, please just push this fix to Sigil master.

Nicely done!


Quote:
Originally Posted by DiapDealer View Post
Try this on for size...

If you build your own Sigil, replace /usr/local/share/sigil/python3lib/repomanager.py with the repomanager.py attached to his post. If you use the Sigil from the pacman repos, the file to replace will be /usr/share/sigil/python3lib/repomanager.py. If it works, that should hold you until the official fix is released.

It's working for me with both pre- and post dulwich 0.20.46.
KevinH is offline   Reply With Quote
Old 09-18-2022, 08:56 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,011
Karma: 6361444
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
We should probably run through all the Dulwich pieces we use and make sure nothing else is in danger of being dumped.
Yes, good idea. I will grab the latest dulwich and look for deprecation warnings.

Unfortunately, dulwich use of versions and its development is unique to say the least.

I donated literally a bunch of code to dulwich to do a simple merge (not just a fast forward) years ago now and virtually none of it was integrated. It seems something as basic as a merge would have been a priority but .... I have given up caring. They seem to worry more about style versus substance.
KevinH is offline   Reply With Quote
Old 09-18-2022, 09:07 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Since it works in both, please just push this fix to Sigil master.

Nicely done!
Will do.

Thanks for catching this so quickly @RbnJrg! This would have actually broken after the Sigil 1.9.20 release.
DiapDealer is offline   Reply With Quote
Old 09-18-2022, 10:08 PM   #11
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,872
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
Will do.

Thanks for catching this so quickly @RbnJrg! This would have actually broken after the Sigil 1.9.20 release.
Thanks to you for fixing the issue so fast! The replacement of repomanager.py did the trick!
RbnJrg is offline   Reply With Quote
Old 09-19-2022, 01:24 PM   #12
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,011
Karma: 6361444
Join Date: Nov 2009
Device: many
Took a look at the 0.20.45 version before the removal of the deprecated stuff. We do not use dulwich/client.py at all, we do not use index.py's commit_index, we already use tag_create() instead of tag(), and we do not directly work with the RefsContainer objects.

So list_tags to tag_list is the only change that should impact us.

That said I looked back to dulwich 0.18 and even dulwich 0.16 and we could probably safely just change it to tag_list since it existed way back then as well. I think 0.16 is the version of dulwich we first used to introduce checkpointing to Sigil.

So we should be good with your change all in all.
KevinH is offline   Reply With Quote
Old 09-19-2022, 02:23 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,828
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I may just change it to tag_list() outright. It would be a lot more straightforward that way.
DiapDealer is offline   Reply With Quote
Old 09-19-2022, 03:20 PM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,011
Karma: 6361444
Join Date: Nov 2009
Device: many
Yes, agreed. Please do when you get a free moment.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil 1.2.0 Undo Issues blewbubbles Sigil 7 06-19-2020 09:49 AM
New to Using Sigil and Having Issues jester1972 Sigil 20 04-30-2017 09:24 AM
New Issues in Sigil 0.9.3 jafprrr Sigil 11 03-10-2016 11:59 AM
issues with sigil 0.8.4 eregs Sigil 2 02-27-2015 08:01 AM
Sigil Spacing Issues Shak Sigil 1 05-17-2013 01:55 AM


All times are GMT -4. The time now is 04:33 AM.


MobileRead.com is a privately owned, operated and funded community.