Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-21-2016, 11:55 PM   #1
darkbreath
Enthusiast
darkbreath began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Apr 2016
Device: none
Embedded Python Error?

I recently compiled Sigil 0.9.6 on Mint 18 64-bit (Mate). Everything seemed to go smoothly, but after Sigil had been installed, I tried to start it and got these errors:

1. Embedded Python Error
2. error in xmlprocessor repairXML: -2

These two errors alternate and each of them pop up 5-10 times before I briefly see the Sigil window, which then closes itself.

What might be wrong and is the error fixable?

Thanks.
darkbreath is offline   Reply With Quote
Old 08-22-2016, 02:17 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Could this be related to the known error in the libxml2 library? You would need a version lower than 2.9.3 (where the error was introduced) and copy that to /usr/local/libs/sigil.

See post here.

I don't know if it is related, but it might be.
Toxaris is offline   Reply With Quote
Old 08-22-2016, 04:45 AM   #3
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
This error means you have not properly built Sigil. Something about the Internal Python library is broken. My guess is you are missing the python 3.4 or 3.5 python libraries needed or have not properly instalked your build. I build on Linux Mint 18 now and have no issues if I CLOSELY follow the Building on Linux guide provided in the docs folder.

KevinH
KevinH is offline   Reply With Quote
Old 08-22-2016, 07:21 AM   #4
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: 27,468
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you didn't get any errors when compiling Sigil, there are only two things I can think of that would result in that particular error after installation:

1) you forgot to install the six and/or lxml python modules.
2) you mistakenly enabled the PKG_SYSTEM_PYTHON option when doing the initial cmake config.

Number one is more likely. Look at the BuildingOnLinux instructions and install the extra Python modules it mentions. That should make the error go away. Number two would require reconfiguring, recompiling, and reinstalling.

Also remember that on Mint 18, you can install Sigil from the regular repositories.

Last edited by DiapDealer; 08-22-2016 at 07:23 AM.
DiapDealer is offline   Reply With Quote
Old 08-22-2016, 05:51 PM   #5
darkbreath
Enthusiast
darkbreath began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Apr 2016
Device: none
Quote:
Originally Posted by Toxaris
Could this be related to the known error in the libxml2 library? You would need a version lower than 2.9.3 (where the error was introduced) and copy that to /usr/local/libs/sigil.

See post here.

I don't know if it is related, but it might be.
Do the instructions for building on Linux work on a version lower than 2.9.3? If they do, and if this is the problem, I guess I'll have no choice but to find the source for a very early version and compile it (assuming Sigil was licensed under the GPLv3 back then), unless someone can point out an earlier version of Ubuntu or Mint that had such an early version in its repositories. If Sigil 0.9.5 isn't affected, it might be easier to just go with the official repository version until the problem is fixed.

I'm not entirely sure I have this problem though. The bug report mentions that it's caused by the insertion of an image into an .htm file, but I never even got to that stage. I only tried to open Sigil and I got both errors in my original post.

Quote:
Originally Posted by KevinH
This error means you have not properly built Sigil. Something about the Internal Python library is broken. My guess is you are missing the python 3.4 or 3.5 python libraries needed or have not properly instalked your build. I build on Linux Mint 18 now and have no issues if I CLOSELY follow the Building on Linux guide provided in the docs folder.

KevinH
Like you, I also closely followed the guide. I listed all the packages I've installed that were asked for in the guide below under my response to DiapDealer. Am I missing something?

Also, I don't know if this is important, but I'm using Mate rather than Cinnamon.

Quote:
Originally Posted by DiapDealer
If you didn't get any errors when compiling Sigil, there are only two things I can think of that would result in that particular error after installation:

1) you forgot to install the six and/or lxml python modules.
2) you mistakenly enabled the PKG_SYSTEM_PYTHON option when doing the initial cmake config.

Number one is more likely. Look at the BuildingOnLinux instructions and install the extra Python modules it mentions. That should make the error go away. Number two would require reconfiguring, recompiling, and reinstalling.

Also remember that on Mint 18, you can install Sigil from the regular repositories.
I followed the guide to the letter, and I've also done it several times by now on various Ubuntu installations. In fact, here are the packages I had installed before compiling:

python3
python3.5
python3.5-dev
python3-dev
There is no libpython3, but libpython3.5 is installed
libpython3-dev
libpython3.5-dev
There is no python3.5-pip, but python3-pip is installed
There is no python3.5-tk, but python3-tk is installed
There is no python3.5-lxml, but python3-lxml is installed
There is no python3.5-six, but python3-six is installed

I also double checked that all the python modules are all installed. They are. I get "requirement already satisfied" when I try to install the modules again. In the case of the html5lib module, I actually get 4 "requirement already satisfied" messages.

About the PKG_SYSTEM_PYTHON. this wasn't even in the Linux build instructions, but I included my cmake command below so you can see for yourself whether I did anything wrong.

And thanks for the reminder on the official repository version of Sigil. I will keep it around as a last resort, but I'm hoping to fix this problem first because if I don't, I'm just basically saving the problem to deal with at a later date should an important new version be released in the future. I usually only upgrade to LTS versions also, so if I don't get this to compile I won't be able to use a newer version than 0.9.5 for years.

So what else could be wrong? Well, DiapDealer's 2 possible causes of my problem were conditioned on the premise that I didn't get any errors when compiling. As a matter of fact, I might have gotten some errors, but I didn't think they were important:

Here's the cmake command I used, as well as all the terminal output:
Code:
$ cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/opt/Qt5.5.1/5.5/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release ../sigil-0.9.6-src
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.2", minimum required is "3.4") 
-- Looking for versions: 3.4;3.5
-- Looking for python version '3.4' by checking executables: python;python3;python3.4.
-- Found executable /usr/bin/python with UNsuitable version 2.7.12
-- Found executable /usr/bin/python3 with UNsuitable version 3.5.2
-- Looking for python version '3.5' by checking executables: python;python3;python3.5.
-- Found executable /usr/bin/python with UNsuitable version 2.7.12
-- Found executable /usr/bin/python3 with suitable version 3.5.2
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found suitable version "3.5.2", minimum required is "3.4") 
-- Using Bundled ZLIB
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Using Bundled MiniZip
-- Using Bundled Hunspell
-- Using Bundled PCRE
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for C++ include type_traits.h
-- Looking for C++ include type_traits.h - not found
-- Looking for C++ include bits/type_traits.h
-- Looking for C++ include bits/type_traits.h - not found
-- Looking for bcopy
-- Looking for bcopy - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - found
-- Looking for _strtoi64
-- Looking for _strtoi64 - not found
-- Check size of long long
-- Check size of long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Configuring done
-- Generating done
In particular, these lines might have been errors:
Code:
-- Found executable /usr/bin/python with UNsuitable version 2.7.12
-- Found executable /usr/bin/python3 with UNsuitable version 3.5.2
-- Found executable /usr/bin/python with UNsuitable version 2.7.12
-- Found executable /usr/bin/python3 with suitable version 3.5.2
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found suitable version "3.5.2", minimum required is "3.4")
-- Check size of off64_t
-- Check size of off64_t - failed
If these are errors, how should I proceed given the packages listed above that I've already verified as installed?

Last edited by darkbreath; 08-22-2016 at 05:54 PM.
darkbreath is offline   Reply With Quote
Old 08-22-2016, 06:38 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: 27,468
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Those are not errors. The errors I'm talking about would be after you issue the "make" command. They would result in a failed compilation.

I must admit... I'm pretty puzzled.

Don't worry about the libxml2 bug until you get things running, by the way.

Last edited by DiapDealer; 08-22-2016 at 06:51 PM.
DiapDealer is offline   Reply With Quote
Old 08-22-2016, 10:05 PM   #7
darkbreath
Enthusiast
darkbreath began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Apr 2016
Device: none
I'm reluctant to just give up because I've compiled Sigil successfully several times (with help), though never on Mint.

I stepped away from my computer during the actual compilation because it was taking so long. If there were any errors, could I have missed them? I know there were no errors after the "100%" line. Could there have been a line earlier than 100% that I could have missed?
darkbreath is offline   Reply With Quote
Old 08-23-2016, 01:59 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by darkbreath View Post
Do the instructions for building on Linux work on a version lower than 2.9.3? If they do, and if this is the problem, I guess I'll have no choice but to find the source for a very early version and compile it (assuming Sigil was licensed under the GPLv3 back then), unless someone can point out an earlier version of Ubuntu or Mint that had such an early version in its repositories. If Sigil 0.9.5 isn't affected, it might be easier to just go with the official repository version until the problem is fixed.

I'm not entirely sure I have this problem though. The bug report mentions that it's caused by the insertion of an image into an .htm file, but I never even got to that stage. I only tried to open Sigil and I got both errors in my original post.
I was talking about the libxml2 library version 2.9.3, not Linux...

Anyway, this problem is probably something else. I have build Sigil a couple of times myself and didn't ran into issues myself, sorry.
Toxaris is offline   Reply With Quote
Old 08-23-2016, 09:08 AM   #9
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: 27,468
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by darkbreath View Post
I'm reluctant to just give up because I've compiled Sigil successfully several times (with help), though never on Mint.

I stepped away from my computer during the actual compilation because it was taking so long. If there were any errors, could I have missed them? I know there were no errors after the "100%" line. Could there have been a line earlier than 100% that I could have missed?
Not likely. A compilation error that allowed the compilation to run to completion would be very rare indeed. And conversely, a compilation warning that prevented Sigil from launching would be almost as rare.

I need something confirmed first. On both of the error messages you mentioned:
Quote:
1. Embedded Python Error
2. error in xmlprocessor repairXML: -2
There should be a Show Details button that will contain more info about the error. Could you copy and paste that info here?

For what it's worth, it seems as if your system Python 3.5.2 installation just can't find the lxml module (the Show Details info from above will hopefully confirm this). It's possible you've confused the installation of the lxml module for Python 3 with Python 2. To verify:

Launch an interactive Python 3 session by typing "python3" at a command prompt. Then at the >>> cursor, type "import six" (no quotes, followed by the enter key) and "import lxml" (no quotes, followed by the enter key).

If either of those result in an Import error, your Python 3 environment is incomplete (for running Sigil).

Exit the interactive Python session by typing exit().

Last edited by DiapDealer; 08-23-2016 at 09:11 AM.
DiapDealer is offline   Reply With Quote
Old 08-23-2016, 09:12 AM   #10
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
BTW the error -2 return value message means the python3 could not find/load the xmlprocessor.py module at all.

If you search your installed Sigil, where is the xmlprocessor.py file?

If it is correctly placed, then somehow the code that adds that path to the python3 interpreter set of paths, is not working for you.

KevinH

Last edited by KevinH; 08-23-2016 at 09:15 AM.
KevinH is offline   Reply With Quote
Old 08-23-2016, 09:30 AM   #11
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: 27,468
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's a good point, Kevin. We need to make sure that he's trying to start sigil only after installing it (make install), and that he's launching it with the recommended /usr/local/bin/sigil launch script.

It sounds as if he could be trying to run sigil without it's full complement of support files (/usr/local/share/sigil). Like maybe a partial, broken, or altered (after compilation) installation.

Last edited by DiapDealer; 08-23-2016 at 09:33 AM.
DiapDealer is offline   Reply With Quote
Old 08-23-2016, 10:06 AM   #12
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
If you search your installed Sigil, where is the xmlprocessor.py file?
FYI, if darkbreath followed DiapDealer's instructions, xmlprocessor.py should have been copied to:

Code:
/usr/local/share/sigil/python3lib/
Doitsu is offline   Reply With Quote
Old 10-13-2016, 08:56 PM   #13
darkbreath
Enthusiast
darkbreath began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Apr 2016
Device: none
I figured out the problem, but you won't believe what it was. In retrospect, it would seem like such an obvious thing to check, but hindsight is always 20/20.

The problem was simple. Instead of following the instructions at https://github.com/Sigil-Ebook/Sigil..._edge_Linux.md, I followed the ones at https://github.com/Sigil-Ebook/Sigil...ng_on_Linux.md. That's all. Because I was trying to build on a Mate 18 system, which is considered "cutting edge," I had to use the new compilation instructions, which did not exist the last time I had to compile Sigil.

It seems like a rookie mistake, but I had already seen the documentation at GitHub before and even saved the link, so I didn't consider the possibility that new instructions had been added. I'm certainly not blaming anyone except myself for the mistake, considering the prominent notice at the top of the old instructions pointing to the new ones. I scrolled right past it because I had no reason to think the top of the document had changed.

Everything works flawlessly now.

Last edited by darkbreath; 10-13-2016 at 09:01 PM.
darkbreath is offline   Reply With Quote
Old 10-14-2016, 07:35 AM   #14
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: 27,468
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It really should have worked with the older instructions, too. I don't know what went wrong. The "Cutting Edge" instructions (which were only added after your original troubles, by the way) merely take advantage of the fact that sufficient versions of Python and Qt are already available in the official package repos. Still ... I'm glad you got it working!
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running recipe error: Python function terminated unexpectedly (Error Code: 1) jpassarella Recipes 0 10-05-2012 12:54 PM
QVariant and Python error MAMSPROD Recipes 1 04-29-2012 05:23 AM
Help Kovid 7.31 still getting python error sadievan Calibre 10 11-28-2010 06:27 PM
Python error! didiyy Calibre 6 09-24-2010 02:05 AM
Python Error with Plucker Horse Reading and Management 1 04-07-2003 01:57 PM


All times are GMT -4. The time now is 09:36 PM.


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