07-06-2022, 03:31 AM | #106 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@davidfor: That much weirdness is above my paygrade I'm afraid. Since running it from powershell works, you have a tolerable workaround. You can try checking environment variables in the two contexts to see if there is something different causing it, other than that, I dont have a clue.
|
07-06-2022, 06:24 AM | #107 | |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
Advert | |
|
07-06-2022, 10:16 AM | #108 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Heads up for people running from source, the qt6 branch has been merged into master. So now you can only run from latest source with a calibre 6 beta build.
|
07-06-2022, 10:40 AM | #109 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Is calibre 5 source now frozen or will you backport changes for a while? If frozen then I won't bother to set up parallel development environments.
|
07-06-2022, 11:16 AM | #110 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
07-06-2022, 04:11 PM | #111 |
Custom User Title
Posts: 9,309
Karma: 63232809
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I switched to the master branch, and now my dark mode is missing again. Did I misunderstand?
|
07-06-2022, 04:23 PM | #112 |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
07-06-2022, 04:30 PM | #113 |
Custom User Title
Posts: 9,309
Karma: 63232809
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I see it now. Colour palette.
|
07-06-2022, 05:47 PM | #114 |
Custom User Title
Posts: 9,309
Karma: 63232809
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For anyone else who's run into bold text rendering weirdly in the comments field (this may be dependent on UI font used):
QT6 changed the font weight for 'bold' from 600 to 700. You can search comments:font-weight to find them and then apply this search-and-replace: Last edited by ownedbycats; 07-06-2022 at 05:53 PM. |
07-07-2022, 02:06 AM | #115 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
As the main source is now the Qt6, I installed the beta over my main calibre install and updated the source. When running from source I got:
Code:
calibre, version 5.99.12 ERROR: Startup error: There was an error during calibre startup. Parts of calibre may not function. Click "Show details" to learn more. Traceback (most recent call last): File "E:\Development\GitHub\calibre\src\calibre\gui2\main.py", line 315, in initialize_db_stage2 File "E:\Development\GitHub\calibre\src\calibre\gui2\main.py", line 258, in start_gui File "E:\Development\GitHub\calibre\src\calibre\gui2\ui.py", line 239, in initialize File "E:\Development\GitHub\calibre\src\calibre\gui2\jobs.py", line 628, in __init__ File "E:\Development\GitHub\calibre\src\calibre\gui2\dialogs\jobs_ui.py", line 19, in setupUi AttributeError: type object 'QIcon' has no attribute 'Normal' Code:
icon.addPixmap(QtGui.QPixmap(I("jobs.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) Code:
icon.addPixmap(QtGui.QPixmap(I("jobs.png")), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) That is compiled from jobs.ui. I did see messages about this as I started it the first time, but, I didn't notice if this was updated or not. |
07-07-2022, 02:26 AM | #116 |
creator of calibre
Posts: 44,356
Karma: 23708270
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@davidfor: delete the *_ui.py files and they should be regenerated correctly for PyQt6 automatically.
|
07-07-2022, 03:18 AM | #117 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
|
07-08-2022, 12:59 AM | #118 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The beta does not appear to be loading user created template functions. I should have two. One is used in a plugboard and I noticed errors when updating my device. When I checked, the template function was not displayed in the list in the preferences. I do not see any errors as calibre starts. And I can see the "user_template_functions" entry in the preferences table in the database.
|
07-08-2022, 05:52 AM | #119 | |
Grand Sorcerer
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I assume we are talking about python functions, not stored templates. Some things to try to help me figure out what is going on.
Last edited by chaley; 07-08-2022 at 05:58 AM. |
|
07-08-2022, 11:09 AM | #120 |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes, the Python functions. I have had one working and copied between my libraries for a while. I was able to add the sample and it was listed. But, after restarting calibre, it disappeared. But, it was in the database and the original functions had disappeared.
For the library, I was looking at, the database had: Code:
[ [ "rating_as_stars", "rating_as_stars(x) -- returns x number of stars.", 1, "def evaluate(self, formatter, kwargs, mi, locals, r):\n\ttry:\n\t\tx = int(r) * '\u2605'\n\texcept:\n\t\tx = ''\n\treturn x" ], [ "counts_for_comments", "counts_for_comments(x) -- returns the word and page count formatted for the comment.\n\nThis will look like:\n<p><b>Word count:</b> nnnn <b>Page count:</b> nnnn</p>\n\nIf either count is missing, that part of the string will not be included. If neither exist, the result is empty.", -1, "def evaluate(self, formatter, kwargs, mi, locals):\n\twords = getattr(mi, '#words', None)\n\tpages = getattr(mi, '#pages', None)\n counts_str = None\n if words:\n\t words_str = \"<b>Word count:</b> {0:,}\".format(words)\n counts_str = words_str\n if pages:\n\t pages_str = \"<b>Page count:</b> {0:,}\".format(pages)\n counts_str = counts_str + ' ' + pages_str if counts_str else pages_str\n if counts_str:\n counts_str = '<p>' + counts_str + '</p>' \n\treturn counts_str" ] ] And now, after adding "my_ifempty" and restarting, I have: Code:
[ [ "my_ifempty", "y_ifempty(val) -- return val if it is not empty, otherwise the string 'EMPTY'", 1, "def evaluate(self, formatter, kwargs, mi, locals, val):\n if val:\n return val\n else:\n return 'EMPTY'" ] ] When I added the tweak and restarted, the log showed: Code:
[0.27] Initializing db... from calibre.utils.formatter_functions import FormatterUserFunction from calibre.utils.formatter_functions import formatter_functions class UserFunction(FormatterUserFunction): def evaluate(self, formatter, kwargs, mi, locals, val): if val: return val else: return 'EMPTY' [0.34] db initialized And then after the plugins had finished initializing: Code:
from calibre.utils.formatter_functions import FormatterUserFunction from calibre.utils.formatter_functions import formatter_functions class UserFunction(FormatterUserFunction): def evaluate(self, formatter, kwargs, mi, locals, val): if val: return val else: return 'EMPTY' I'll try the other things tomorrow. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Searching for Text in Footnotes | aherinandrianina | Calibre | 1 | 12-05-2018 04:08 AM |
Troubles searching text in files | Maxwell61 | Library Management | 9 | 09-18-2018 06:13 PM |
searching google from e-reader text | garrry | Related Tools | 2 | 06-15-2013 04:39 AM |
searching a document based on highlighted text | KasPaz | Kindle Developer's Corner | 0 | 02-06-2012 10:37 PM |
Searching text on 300 and 505 | Thrasher | Sony Reader | 6 | 04-28-2010 03:41 AM |