You are here

[Fixed] Sigil - pyvenv FileWrite missing

8 posts / 0 new
Last post
softfoot
Offline
Last seen: 6 months 1 week ago
Joined: 2009-10-15 06:30
[Fixed] Sigil - pyvenv FileWrite missing

In the absence of a specific Sigil forum I'll post this here --- feel free to move it if it's inappropriate here.

I have v0.9.3 installed and runningOK under Win7 64b - but when I install ANY plugin they refuse to run.

eg "Flightcrew" when run against a valid ePub (that validates OK with the built in validation tool) reports an initial error of
"Error Parsing Result XML: Premature end of document".

When I click on the "Details" button I get "Fatal Python error: unable to load the file system codec. ImportError: No module named 'encodings'".

This is with the "bundled" Python.

I have tried installing the PortableApps v2.7 of Python but just get a different set of errors.

Any suggestions welcome.

Desperate to use some of these plugins,
David

Eli Schwartz
Offline
Last seen: 8 years 2 weeks ago
Joined: 2015-04-09 15:25
One of the Sigil devs just

One of the Sigil devs just posted on MobileRead about this: http://www.mobileread.com/forums/showthread.php?t=272070

tl;dr
The pyvenv.cfg file in Sigil's bundled python3 interpreter needs to point its home to itself.

To fix, there needs to be another FileWrite element in SigilPortable.ini
File=%PAL:AppDir%\Sigil\python3\pyvenv.cfg
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

Also on install it needs to contain "%PAL:AppDir%\Sigil\python3" instead of "C:\Program Files\Sigil\Python3".
Hmm, perhaps a wildcard is the best way to deal with this?
Find=?:\*\Sigil\?ython3
Replace=%PAL:AppDir%\Sigil\python3

EDIT: Dur, Linux ==> Windows path separator conversions. :lol:

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 4 months 1 week ago
DeveloperModerator
Joined: 2008-07-24 18:46
Thanks

When this was originally posted, I admit to having skimmed the post, rather than looking into it at the time.

Thanks, Eli, for posting a link to the pertinent information. I'm marking this as a bug so we can track it, and hopefully fix the problem ASAP.

John T. Haller
John T. Haller's picture
Offline
Last seen: 3 hours 8 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Try This

Try adding this after FileWrite8 in the launcher INI:

[FileWrite9]
Type=ConfigWrite
File=%PAL:AppDir%\Sigil\python3\pyvenv.cfg
Entry='Home'
Value=' = %PAL:AppDir%\Sigil\python3'

And see if that gets things working.

Sometimes, the impossible can become possible, if you're awesome!

softfoot
Offline
Last seen: 6 months 1 week ago
Joined: 2009-10-15 06:30
WOW

I'll give that a try as the other proposed solutions don't seem to work for me.
Dave

Rgds,
Dave

softfoot
Offline
Last seen: 6 months 1 week ago
Joined: 2009-10-15 06:30
Tried it didnt help :-(

I got the same error "Error Parsing Result XML: Premature end of document" with any of the above proposed solutions.
It's not dependent on the epub file (I've tried several, including a couple of my own making) and happens with 0.9.3 and 0.9.4.
This was under Win7.
Installing Sigil directly under Win7 (ie NOT the portable version) then FlightCrew works as expected.

Rgds,
Dave

3D1T0R
3D1T0R's picture
Offline
Last seen: 2 years 8 months ago
Developer
Joined: 2006-12-29 23:48
WFM:

Works for me.
I'm not particularly familiar with Sigil, but I tested John's fix with a couple of random plugins I downloaded, and without the fix, it threw errors as described, and after applying John's fix, the errors no longer appeared, and the plugins seemed to be working properly.

Note: I'm not certain (of what exactly to expect), but it seemed to act a bit strange when I tried using a plugin (after adding the fix) that had been installed prior to adding the ConfigWrite to SigilPortable\App\AppInfo\Launcher\SigilPortable.ini.

~3D1T0R

John T. Haller
John T. Haller's picture
Offline
Last seen: 3 hours 8 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in Sigil Portable 0.9.6

This is fixed in today's release. home is case sensitive and the earlier launcher configuration was mistakenly writing the path to Home.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments