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

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2011, 09:07 AM   #16
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Yes sorry - I didn't mean for you to install the plugin again, I meant just exit and restart Calibre using the debug option. When Calibre starts up, it attempts to load all of the GUI plugins you have installed. If there are any errors, you will see that in the output. That is why a plugin "disappears" from the menu bar (or rather does not appear). And because it hasn't loaded, that is why going into Preferences->Plugins and trying to customize it you get an error dialog thrown in your face (without my helpful debug statements).

You don't get asked about which toolbar etc to install on again because as far as Calibre is concerned it has remembered your choice from last time, and as soon as it can load the plugin it will display it there

I have replicated your ZipImport error using your folder name, so I am now 100% certain that is the cause of the issue, which is way further ahead of where we were previously. The next step is how to fix it or workaround it. Note that this appears to be a Python library level (zipimporter/os.path.dirname) problem, though it needs a Python guru like Kovid to confirm I am not talking crap about that.

One definite workaround would be to change where calibre stores all your configuration information. See http://calibre-ebook.com/user_manual...ment-variables. If you moved your current Calibre folder from C:\Documents and Settings\vlakuz\Data aplikací\calibre\ to a directory that contained only ascii non-accented characters in it, set the CALIBRE_CONFIG_DIRECTORY environment variable to that folder then it should work ok for you. You will need to reinstall any plugins again if you do that though as there paths are hard-coded in a configuration file, but you won't lose any of your other settings.

In the mean-time I can keep experimenting and perhaps Kovid may have a suggestion for an alternative fix.
kiwidude is offline   Reply With Quote
Old 03-26-2011, 09:29 AM   #17
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by vladacr View Post
Well, I moved the zip to the root of D: and started the installation. It worked, no error message, I was even offered to choose the menu items. Everything seemed fine. Restarted Calibre, but there is no "search the internet" item in none of the menus. When I go to plugins, find the plugin and click on "customize", then there goes the erroe again
Where did you tell it to place the menu? It might be on the top row off of the screen. You might have to click the little arrow to the right to see the icons not displayed.

Also your path for the configuration directory has the same accents that seemed to get in the way of the initial plugin install. Try copying your calibre configuration to a cleaner path. You can use this batch file to start calibre and point to the new configuration location. Change path locations as required. Everything after REM are comments and don't actually run. Save as calibrerun.bat

Code:
REM Specify the location of the Calibre Config files
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET CALIBRE_CONFIG_DIRECTORY=C:\My Dropbox\CalibreConfig

REM Specify location of calibre program files
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:
CD \Program Files\Calibre2

REM Display settings that will be used
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

echo CONFIG=%CALIBRE_CONFIG_DIRECTORY%

REM  The following gives a chance to check the settings before
REM  starting Calibre.  It can be commented out if not wanted.

echo "Press CTRL-C if you do not want to continue"
pause

REM Start up the calibre program.
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM 
REM Normal - Start calibre.exe
REM Debug w/log file - calibre-debug -g 1> log.txt 2>&1

Start calibre.exe
Good Luck.

Edit: This is what happens when I help the wife with some chores. Kiwidude jumps in with the same work around.

Last edited by DoctorOhh; 03-26-2011 at 09:34 AM.
DoctorOhh is offline   Reply With Quote
Old 03-26-2011, 09:35 AM   #18
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Ok, if you can believe what you read on the internet, it appears someone else out there also believes it is a known Python issue on Windows.
http://www.mail-archive.com/cx-freez.../msg00595.html

Please try my suggested workaround of moving your Calibre config directory and let us know how you got on. Once you confirm this works I will add some notes to the introduction to plugins sticky thread. It appears this issue will only affect international users on Windows who either have accented characters in their user names, or have a translated installation of Windows.

I think the reason why Loeffel got it working in the end on the "Generate Cover" thread had nothing to do with Calibe reinstallations, but more to do with him eventually installing the plugin from a directory that did not have accented characters in it. I would also guess that they have a different international settings of Windows on their machine to you, which does not have an accented character in whatever the translation of "Data Applications" is if any. It would also explain why the user on the Kindle Collections thread never reported any success.

Other than rewriting all my plugins to not use ZipImporter, I don't think there is anything else I can do at this point. I am at least stoked to have gotten to the bottom of why this occurs for some users.

EDIT: This is what happens when you take too long to type a post. dwanthny posts in-between and makes me look like a repetitive idiot

Last edited by kiwidude; 03-26-2011 at 09:56 AM. Reason: Fix Loeffel thread reference
kiwidude is offline   Reply With Quote
Old 03-26-2011, 09:50 AM   #19
vladacr
Member
vladacr began at the beginning.
 
Posts: 15
Karma: 34
Join Date: Mar 2011
Device: android
OK, guys, I moved the Calibre config directory to "c:\Documents and Settings\vlakuz\Application Data\calibre" changed the variable accordingly, and.... it works!!!

Thanks to all of you for help. If I can help with any other debugging, just let me know.
vladacr is offline   Reply With Quote
Old 03-26-2011, 09:54 AM   #20
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Phew - brilliant. I've just chucked a message to Kovid, but I suspect the only long term fix to stop more users having this nasty issue over time is for me to change all my plugins. And for others like meme, user_none and kpw who have all based code on my plugins to do the same workaround.

I wanted to get you up and running asap to confirm there was nothing else going on which is great. So we have a confirmed workaround while we figure out what to do next
kiwidude is offline   Reply With Quote
Old 03-26-2011, 10:00 AM   #21
vladacr
Member
vladacr began at the beginning.
 
Posts: 15
Karma: 34
Join Date: Mar 2011
Device: android
Maybe future versions of Calibre just create and use English default folder, "Application Data", instead of using system default folder "Data aplikací" and the like on non-English systems.
vladacr is offline   Reply With Quote
Old 03-26-2011, 02:50 PM   #22
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Hi, I had the same problem with some plugins, the only way to install them properly was to revert to an older version (0.7.45) of Calibre. My Calibre data is stored in C:\Users\Loeffel\AppData\Roaming\calibre so only ASCII is used. So the error must be somewhere else. I have a german Win7, but as you know Win7 only uses english pathnames and only translates them for the user. So the path is shown as C:\Benutzer\Loeffel\AppData\Roaming\calibre.

The plugins where easily installed with the new plugin downloader. When I had the problem the actual version was 0.7.50. I had tested many thing then.
Some plugins could be installed with 0.7.48, other with 0.7.48 but not higher. The higher the Calibre version was more plugins couldn't be installed any more.

The plugin updater I could install with 0.7.45 perhaps with 0.7.46 but not with 0.7.46 or higher. After installing the plugin I've updated Calibre und then I was able to install all plugins via the updater without any problems.

I've tested many things unzip and zip the plugin, download it with various browsers and downloaders, with and without virus scan, clean Calibre installation from scratch, the result was always the same the higher the Calibre version less plugins could be installed.
Loeffel is offline   Reply With Quote
Old 03-26-2011, 03:01 PM   #23
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Loeffel - that your AppData path does not have accented characters in it matches what I expected as stated above. Otherwise you would not I believe have ever got these particular plugins to work, regardless of Calibre version or fiddling. This is a Python level problem, not a Calibre or a plugin one.

However I believe (and correct me if wrong) that at some point when you got that error you had the plugin zip file that you had downloaded in a subdirectory somewhere which had non-ascii in the path to it?

As to the variety of behaviours you saw, not all plugins use the ZipImporter mechanism. For instance the Goodreads metadata download, Goodreads covers download and a couple of the other plugins do not use ZipImporter.

Last I heard from Kovid was that he is working on a new mechanism for plugins. Once he has that available I guess it will become clearer whether all us plugin developers need to make a change to support that new mechanism.
kiwidude is offline   Reply With Quote
Old 03-26-2011, 04:44 PM   #24
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
The plugins where alwas in F:\EBookTools\Kindle\Calibre Plugins. Nearly, during the tests I even use downloads from E:\Downloads
Loeffel is offline   Reply With Quote
Old 03-26-2011, 04:49 PM   #25
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
If it is a Python Problem, why does the possibility to install those plugins change with the version number of Calibre? The Phyton version was always the same.
It is a strange behaviour, that's out of the question, but I'm not that sure, that we've really rooted it out.
Loeffel is offline   Reply With Quote
Old 03-26-2011, 05:21 PM   #26
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Loeffel - What we do have for a fact is a repeatable scenario with Vladcr that I can replicate on my own machine, and it correlates with information that both I and subsequently Kovid has dug up with reported issues with Python and how it works on Windows. I stand by my comments above in that had your AppData path had accented characters in it, you would not have had any success on Windows in getting plugins using ZipImporter to work.

I had hoped that an "invalid" source directory would also explain your issue as well - from the explanation you have given it would appear that is not the case. As you now have a working system we have no way of repeating the scenario you found yourself in. There are too many variables involved in terms of the choice of plugins and the various changes you will have made to your machine in your attempts to get something working to speculate now about what else might have happened. For instance can you say with 100% certainty that it was exactly the same error message each time you switched Calibre versions? As it could well have been version compatibility issues with the plugins preventing them from installing etc, particularly if you went back to 0.7.46 with a more recent plugin...

If someone else reports the same error, with only ascii characters in any of their paths then of course we will have to try to find an additional reason. Hopefully Kovid's new import mechanism will make this entire issue historical, but only time will tell.
kiwidude is offline   Reply With Quote
Old 03-26-2011, 06:45 PM   #27
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Quote:
Originally Posted by kiwidude
As it could well have been version compatibility issues with the plugins preventing them from installing etc, particularly if you went back to 0.7.46 with a more recent plugin...
I used the same plugin version during the tests of changing the Calibre version. So the plugin file was in the same directory and didn't change. Only the Calibre version changed and the error message came up with newer Calibre versions. Strangely plugins that couldn't be installed could be installed on version they were never build for and where they would never run. And there was always the same error message stating an error in two lines of source code. (need to look into the other thread for the exact error message)

I will have a look if I can repeat the scenario.
Loeffel is offline   Reply With Quote
Old 03-26-2011, 06:58 PM   #28
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
If you are willing to try to repeat the problem, by all means that would be great to find another cause of it. I just looked at your error stack you posted and it did remind me of one thing that would be relevant to that. In Calibre version 0.7.49 we added code to ask the user which toolbar to add it to when installing. As a result of this, it will attempt to "load" the plugin at first install time, rather than waiting for the restart (it needed to do this so as to be able to ask the plugin what toolbars it is allowed to be installed on).

If you install an earlier version of Calibre than this, the plugin will not be properly loaded until you restart Calibre. So while you think the Install has "worked", in fact when you restart Calibre it would still have the same error while attempting to load. You just get more "early warning" on Calibre 0.7.49 onwards.

Hope that makes sense.
kiwidude is offline   Reply With Quote
Old 03-26-2011, 07:33 PM   #29
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
I understand what you mean, yes.
Loeffel is offline   Reply With Quote
Old 04-02-2011, 10:26 AM   #30
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Hi, I tried to reconstruct it, but as we expected now it is working. :-(
Loeffel 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
Renaming the otacerts.zip file...QQ Cpl Punishment Nook Developer's Corner 3 02-07-2011 09:14 PM
html file read as zip Newmarket2 Calibre 12 01-05-2011 04:17 PM
When download .epub file,it becomes .zip?? appstrading ePub 4 07-29-2010 03:21 PM
Mobileread Books in a ZIP file? Logseman Feedback 6 07-08-2010 05:45 PM
Bad Zip file theducks Calibre 7 02-10-2010 10:35 AM


All times are GMT -4. The time now is 07:38 AM.


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