![]() |
When using this plugin with 0.9.15 (beta), I get the following error message: "You must select an image from the list or load a file or press Close".
I have selected an image from the list, and yet this message persists. I don't use this plugin often, so not sure if this problem is new with 0.9.15, but thought I'd report it. I'm on a Mac (High Sierra), if that makes a difference. |
Seems to working as expected on on Windows with 0.9.15. Can you document the exact steps you're taking?
|
3 Attachment(s)
1) Plugins > Edit > InsertImageSVG
2) Select image — note: image does not appear in the plugin's preview pane, which remains blank (see 1st image attachment) 3) Click "Insert" 4) Get error message (2nd image attachment) I tried this with an image already imported in the epub and also using the "Import external image" button. I also tried changing the position ("At the start," "At the end," etc.) but that didn't make a difference. Finally, when I tried re-sizing the plugin window, the preview pane goes from blank to showing some distortion (3rd image attachment) |
I have migrated from a late 2015 iMac to a 2019 i9-9900K CPU @ 3.60GHz with 40gb ram and have the same issue as described by odamizu in the above post, with the difference that it now occurs in both the sigil beta (running in a newly installed mohave vm) and .14. In my case it only impacts jpegs. Other image formats will insert correctly. The error message in the plugin details is:
Code:
objc[1904]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa8ae13c8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x10a57af50). One of the two will be used. Which one is undefined. |
Maybe a broken Pillow library?
I will try this plugin tomorrow on my Mac dev machine and see if changing PiL/Pillow version matters. Does this plugin use PyQt5 or tk graphics? |
Tk as far as I know (without looking).
|
Quote:
|
And I can't swear that I tested with anything other than pngs. I'll try again in a bit.
|
Mac Users - please make sure you have installed ActiveState's ActiveTCL for Mac version 8.6.x just to doublecheck.
|
Just checked again with jpegs to be certain, and it still works for me on on Windows (bundled Pillow v5.4.1) and on Linux (system Pillow v6.0.0).
I'd focus on making sure the following works in general on the Macs in question (with the bundled version of Pillow): Code:
from PIL import Image, ImageTk |
Quote:
|
Okay, I can reproduce exactly this problem on my dev machine. It is PIL related and has to do with running a size bomb test on the jpeg contents. I will get this fixed for the upcoming non-beta version.
|
I have tracked this one down to newer Pillow versions actually importing from distutils just to spawn a process (not the right way!) and to check versions but only for jpeg and tiff images.
distutils is supposed to be used when a package is being installed, not for day to day working of the package. For that reason distutils was not part of the mac embedded Python interpreter as it should be unneeded by already installed packages. I have now added back in distutils so that newer versions of Pillow will function. This bug fix has been pushed to master and will appear in the upcoming version (non-beta) of Sigil. Thank you for your bug report. |
InsertImageSVG plugin working great on 0.9.16. Thank you so much!
Quote:
|
Hi CalibUser! Running InsertImageSVG plugin on Sigil 0.9.991 with epub having non-Sigil-standard structure results in wrong filepath, so the image isn't found.
Standardizing epub structure with Tools > Restructure Epub to Sigil Norm solves the problem and allows the plugin to run successfully. ETA: Fixing the filepath manually also works :) |
@odamizu: Thanks for sharing this solution with the Sigil community.
|
For the record: we noted this workaround in the plugin development thread where we posted the info about how to make sure plugins were compatible with the new plugin framework that will be a part of Sigil 1.0.
It was always our plan that all plugins would still function correctly so long as epubs had the traditional Sigil structure. We wanted to make sure users wouldn't have to do without their favorite plugins, and that plugin-devs didn't have to scramble madly to fix their suddenly broken plugins. The Sigil 0.9.991 pre-release was also intended as a means for plugin devs to test their plugins to see if they were able to work with alternatively structured epubs (which Sigil 1.0 will support), or if there were modifications needed to be made. The manual conversion to Sigil's traditional structure will provide a workaround for those plugins that may need tweaking in the interim. |
And I would we willing to help any plugin developer fix any of their plugins to work for both the old and new structures. Just ask.
KevinH |
Yes. Same goes for me.
I did make a quick tweak to this plugin yesterday as "proof of concept" for alternatively structured epubs. It's not exhaustive by any means, but it allowed at least partial functionality (images already internal to the epub) in my testing. It shouldn't take a ton of effort to get rid of the hard-coded "../Text/" or "../Image/ assumptions being made. |
Quote:
|
It seems the path to the images may be incorrect when editing an epub not following Sigil's typical layout. (It works if you let Sigil re-structure the epub, or removing the path to the image file.)
Could you please update your excellent plugin for Sigil 1.0.0 use? Thanks, :) |
Quote:
|
Hi folks,
getting suddenly this error message. Now changes or updates of any kind. Sigil 0.9.14 Code:
Status: failedP.S. Problem solved by deleting the plugins preference file and reinstalled it. |
A request
Would it possible to add the option to insert the svg wrapper not in a new .xhtml file but in the page (file), and the place, where the cursor is positionated?
Thanks in advance for considering if this solicitude is or not doable. |
@RbnJrg: I think your suggestion would need a different plugin; it is relatively easy to insert a new page in an ePub using Sigil, but I think your suggestion would require the ePub to be unzipped so that an existing page could be modified to incorporate the svg wrapper and then zipped up again.
|
Quote:
|
3 Attachment(s)
Quote:
Attachment 190859 As you can see, there are two paragraphs of text. And between them, I want to add a svg wrapper, so the output would be something as: Attachment 190860 What I'm seeking is that the wrapper is inserted where I have the cursor, not in a new .xhtml page; in the example I would have the cursor here: Attachment 190861 Can your plugin do something so? |
Cursor position is not passed to any plugin. So the only possibilities is for any plugin to do this would be:
1. The Plugin will add image file to epub and copy the required svg and any xhtml pieces needed to your clipboard, so that the user can just paste it once the plugin returns. or 2. The user adds a unique placeholder to tell the plugin where you want the svg to be inserted. Something like: Code:
<!-- PLUGIN INSERT SVG HERE -->Then the plugin would have to be modified to look for that placeholder and replace it with the required svg. Either of these approaches could work to accomplish what you want but this up to the plugin dev if to implement if they want. |
Quote:
|
Quote:
I add a class to the div wrapper: div.breakavoid {page-break-inside: avoid;} Or for smaller images you could use one with margins, to separate it from text, or size it. PS -- I see from later posts you already worked that out, but leaving this as the div styling might be useful. |
@RbnJrg: I have updated the plugin to paste an image with svg tags into an ePub, following the suggestion by KevinH.
You can apply a div class to the wrapper, if required, as suggested by AlanHK. |
Quote:
|
| All times are GMT -4. The time now is 08:04 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.