Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-19-2026, 12:24 PM   #91
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
Okay, it was doable but required adding a new GetFirstUseOfClass routine to XhtmlDoc.cpp and of course modifying the Classes Used report.

Since it takes you to the line of the tag where that class attribute is used in CodeView, you can just right click in that class attribute to get moved to its definition in the CSS file. So you can easily get to both relevant locations with just a few clicks.

I have pushed this change to master. If you build your own please test it.

I really hope you are right and this is what the suggester wanted, and that I had just misunderstood. I kept the previous code around just in case.

Last edited by KevinH; 02-19-2026 at 12:27 PM.
KevinH is offline   Reply With Quote
Old 02-19-2026, 01:22 PM   #92
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
Okay, to put every platform on an equal footing, I have created RC3 builds for all platforms, using the very very latest master and with all the bug fixes and changes early RC testers have asked for.

Hopefully these builds will hold everyone for about the next 4 weeks or so until an official final release can be made.

See the first post in this thread for the locations for the RC3 downloads:
https://www.mobileread.com/forums/sh...61&postcount=1
KevinH is offline   Reply With Quote
Advert
Old 02-19-2026, 03:02 PM   #93
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DiapDealer View Post
It already is. Set the environment variable (SIGIL_SKIP_UPDATE_CHECK) that stops Sigil from looking for updates when Sigil launches. A dead network is not the same thing as no internet to the "are you online" check.
Apologies. Disabling Sigil's update check does NOT prevent the embedded Python errors when launching Sigil in the normal Safe Mode. I will definitely be looking into this.
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 03:53 PM   #94
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DiapDealer View Post
Apologies. Disabling Sigil's update check does NOT prevent the embedded Python errors when launching Sigil in the normal Safe Mode. I will definitely be looking into this.
Somehow... xmlprocessor.py's call to import sigil_bs4 which is turn calling set_trace from the pdb module is picking up an asynchronous socket error when Windows Safe Mode's dead networking is encountered. The only problem is:

1) my python updatechecker is not to be run (via embedded python in main.cpp) when the SIGIL_SKIP_UPDATE_CHECK environment variable is set, and...

2) even if the environment variable is NOT set, the socket check in updatechecker.py is wrapped in a try/except clause so as to always return safe values.

So my question (to anyone--including myself!) is: How is a process started via xmlprocesser.py and BeautifulSoup picking up an error from Windows about a dead network when no network check is supposed to be taking place (and even if it were; precautions are in place to prevent crashes and always return safe values)?

Yes. My brain just broke.

Last edited by DiapDealer; 02-19-2026 at 03:56 PM.
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 04:07 PM   #95
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Strike all that. My question is much simpler:

Why is sigil_bs4 (called by xmlprocessor.py in main.cpp via embedded python) attempting to trace a Windows networking error at all?
DiapDealer is online now   Reply With Quote
Advert
Old 02-19-2026, 04:09 PM   #96
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
I searched the sigil_bs4 code for use of set_trace and it does *not* appear to be used anyplace inside our sigil_bs4 according to a github search. It is probably a hold over from an earlier version of bs4.

We could try commenting this line out of sigil_bs4 files: dammit.py, element.py, and builder/_html5lib.py

from pdb import set_trace

And according to a search pdb is the python debugger module so it is probably a leftover from an old debugging session.

I think we can safely remove it from all 3 files.

What I do not understand is why this error never showed up before. Was pdb changed in Python 3.14.2?

Last edited by KevinH; 02-19-2026 at 04:26 PM.
KevinH is offline   Reply With Quote
Old 02-19-2026, 04:29 PM   #97
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
What I do not understand is why this error never showed up before. Was pdb changed in Python 3.14.2?
I can't remember the last time I tried to launch Sigil in Windows' Safe Mode before today. I suspect not that many other users can either. We never suggest running Sigil in Safe Mode for debugging purposes any more. We used to recommend it to determine if there were problems with third-party explorer extensions, so something must have changed since then.

Last edited by DiapDealer; 02-19-2026 at 04:32 PM.
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 04:30 PM   #98
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
Do you want me to remove those 3 imports of pdb from sigil_bs4 and push that to master.

I can confirm they are not used nor needed to run Sigil.

Last edited by KevinH; 02-19-2026 at 04:51 PM.
KevinH is offline   Reply With Quote
Old 02-19-2026, 04:57 PM   #99
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I guess I'm still confused why importing set_trace from pdb raises errors in Safe Mode, but not normal Windows with networking. I was under the impression that the set_trace() function had to be explicitly called to start a debugging session with python's pdb module. That never happens anywhere. Only the import.

But if they're not needed, then they're not needed. I say go ahead and remove them if you're certain.

Last edited by DiapDealer; 02-19-2026 at 05:22 PM.
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 04:59 PM   #100
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
I will push that change with deploy now
KevinH is offline   Reply With Quote
Old 02-19-2026, 05:23 PM   #101
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,403
Karma: 6686152
Join Date: Nov 2009
Device: many
And this is a known bug in Python 3.11.X and later. The async windows_events.py file imports the _overlapped module which has the following bug report about it:

https://github.com/python/cpython/issues/131131

I can not tell if this will ever be fixed based on the discussion as cpython people keep pointing toward other module authors.

So we were best off removing all use of pdb until asyncio and/or _overlapped are fixed if ever. Not even a loopback socket can be opened / works when Windows is in Safe mode, so the asyncio code uses loops that use loopback sockets and they will not work.

Last edited by KevinH; 02-19-2026 at 05:31 PM.
KevinH is offline   Reply With Quote
Old 02-19-2026, 06:05 PM   #102
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,428
Karma: 178402650
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I compiled the latest code and Sigil works in safe mode now. A bit strange to me since the previous build worked when I turned off networking in normal mode but safe mode crashed out.
DNSB is offline   Reply With Quote
Old 02-19-2026, 06:21 PM   #103
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
And this is a known bug in Python 3.11.X and later. The async windows_events.py file imports the _overlapped module which has the following bug report about it:

https://github.com/python/cpython/issues/131131

I can not tell if this will ever be fixed based on the discussion as cpython people keep pointing toward other module authors.

So we were best off removing all use of pdb until asyncio and/or _overlapped are fixed if ever. Not even a loopback socket can be opened / works when Windows is in Safe mode, so the asyncio code uses loops that use loopback sockets and they will not work.
Wow! So merely trying to import _overlapped in Windows minimal safe mode will cause the error? I sure don't understand the logic that would place the responsibility for this anywhere but on cpython. It's a built-in module and it can be used by other code in situations where networking is not relevant. Fix it.

Oh well. Let me do some testing. Thanks for tracking that bug down!
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 06:23 PM   #104
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
I compiled the latest code and Sigil works in safe mode now. A bit strange to me since the previous build worked when I turned off networking in normal mode but safe mode crashed out.
It's the loopback device that's missing in minimal safe mode. It's still present when you turn off networking manually.
DiapDealer is online now   Reply With Quote
Old 02-19-2026, 06:30 PM   #105
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: 29,134
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm curious to see if there's any noticeable speedup in a Sigil startup on slower machines without all the pdb, windows_events, _overlapped overhead that was previously involved with sigil_bs4 that xmlprocessor.py uses. Probably not, but one can hope!
DiapDealer is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
release candidate 0.2-rc6 lunohod OpenInkpot 0 12-04-2009 06:24 PM
release candidate 0.2-rc5 dottedmag OpenInkpot 50 12-04-2009 05:44 AM
release candidate 0.2-rc4 dottedmag OpenInkpot 10 11-12-2009 01:35 PM
release candidate 0.2-rc3 dottedmag OpenInkpot 10 11-05-2009 03:18 AM
release candidate 0.2-rc1 dottedmag OpenInkpot 36 10-18-2009 01:07 AM


All times are GMT -4. The time now is 08:18 AM.


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