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 01-12-2016, 02:30 PM   #46
alutian
Junior Member
alutian began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2016
Device: none
Count Pages, Extract ISBN, Find Duplicates, Quality Check, View Manager and Modify ePubs all install and appear in the toolbar. They all seem to be working and customisable via Preferences/Plug-ins.

Calibre path is C:\Program Files\Calibre2\calibre.exe as expected, but

C:\Users\Alutian\AppData\Roaming\calibre\plugins\L ibrary Codes.json does not exist. Like jems007 with the 32-bit portable version, I have the .zip file but no .json. Can I assume the .json file will only be produced when the plug-in is customised?

I have exactly the same problem with the 32-bit version, but I have yet to try the portable version.

Alutian.
alutian is offline   Reply With Quote
Advert
Old 01-12-2016, 02:43 PM   #47
DaltonST
Deviser
DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.
 
DaltonST's Avatar
 
Posts: 883
Karma: 71334
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
Quote:
Originally Posted by alutian View Post
Count Pages, Extract ISBN, Find Duplicates, Quality Check, View Manager and Modify ePubs all install and appear in the toolbar. They all seem to be working and customisable via Preferences/Plug-ins.

Calibre path is C:\Program Files\Calibre2\calibre.exe as expected, but

C:\Users\Alutian\AppData\Roaming\calibre\plugins\L ibrary Codes.json does not exist. Like jems007 with the 32-bit portable version, I have the .zip file but no .json. Can I assume the .json file will only be produced when the plug-in is customised?

I have exactly the same problem with the 32-bit version, but I have yet to try the portable version.

Alutian.
Library Codes is not customizable via Preferences\Plugins. All of the customization is done within the menu choice for that purpose. If you click the Preferences\Plugins\Customize button, a little dialog tells you that.


Attached is a .json file for it. Put it where it belongs and see what happens. Rename it from .json.txt to just .json. Mobileread.com does not allow .json files to be uploaded.


DaltonST
Attached Files
File Type: txt Library Codes.json.txt (258 Bytes, 96 views)
DaltonST is offline   Reply With Quote
Old 01-13-2016, 08:27 AM   #48
DaltonST
Deviser
DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.
 
DaltonST's Avatar
 
Posts: 883
Karma: 71334
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
@alutian:

Quote:
The only thing I can think of which is not a standard installation of Windows 10 64-bit is that my temp and tmp folders are not on the same drive as the Windows installation. Windows is on C:, temp files are on A:, a RAMDrive.
Just for grins, temporarily reset the temp and tmp folders to the default settings. Keep the Calibre 64 version. Manually delete the Library Codes.zip file. Run Calibre 64. Manually load LC from the .zip file you manually downloaded. Restart Calibre. See what happens.


DaltonST
DaltonST is offline   Reply With Quote
Old 01-13-2016, 01:39 PM   #49
alutian
Junior Member
alutian began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2016
Device: none
Quote:
Originally Posted by DaltonST View Post
@alutian:



Just for grins, temporarily reset the temp and tmp folders to the default settings. Keep the Calibre 64 version. Manually delete the Library Codes.zip file. Run Calibre 64. Manually load LC from the .zip file you manually downloaded. Restart Calibre. See what happens.


DaltonST
You beat me to it!!

Problem cured, but not problem solved.

I now have Library Codes up and running, more by luck than judgement. (History...) I have Windows 64bit set up normally on the C: drive. I also have drive A:, which is an 8GB RAM Drive, originally installed, ironically, for Calibre - it really speeds up the mamipulation of large libraries. (Calibre seems to be very 'safe' with files but at the cost of reading and writing an awful lot...)

Windows keeps its Temp folders on A: (saves wear and tear on the SSD C: drive).

No problem until Library Codes refused to play ball. I thought I might cure the problem by deleting the RAM Drive, but it made things worse - now Calibre failed to start:

Python function terminated unexpectedly [Error 3] The system cannot find the path specified: u'A:\\Temp\\calibre_ywrgmh' (Error Code: 1)

Only cure was to set the Windows Temp to the C: drive and uninstall and re-install Calibre. Now it works!

First thoughts: I have deleted an essential file in the A:\Temp folder, but it's a 'path' that cannot be found and... Caliber will start, with Library Codes working, if the Windows Temp directory is on the C: drive, even though the directory is empty. If you look in the Temp directory before Calibre starts, the 'path specified' does not exist. Something in Calibre (Library Codes?) writes to the Windows Temp directory, then reads from C:\Temp. Fine if the Temp directory is C:\Temp, but not if Windows Temp -> A:\Temp. It's not a RAM Drive problem as I can reproduce it by setting Windows Temp -> D:\Temp, D: being a standard HD.

That's my best guess at the problem!


Alutian
alutian is offline   Reply With Quote
Old 01-13-2016, 02:22 PM   #50
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 20,667
Karma: 20350406
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
did you try starting Calibre with the commandline switch
CALIBRE_TEMP_DIR - sets the temporary directory used by calibre
(would allow you to keep yor Windows Temp)
theducks is online now   Reply With Quote
Advert
Old 01-13-2016, 02:37 PM   #51
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,827
Karma: 7214735
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
did you try starting Calibre with the commandline switch
CALIBRE_TEMP_DIR - sets the temporary directory used by calibre
(would allow you to keep yor Windows Temp)
and if that works you should be able to use the CALIBRE_TEMP_DIR Environment variable to effect a permanent re-assignment.

BR
BetterRed is offline   Reply With Quote
Old 01-13-2016, 04:59 PM   #52
alutian
Junior Member
alutian began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2016
Device: none
OK. RAMDrive A: back online.

Windows Temp -> A:\TEMP, CALIBRE_TEMP_DIR -> C:\TEMP

Fires up Calibre and it works... but no Library Codes

Windows Temp -> A:\TEMP, CALIBRE_TEMP_DIR -> A:\TEMP

Fires up Calibre and it works... but no Library Codes

Windows Temp -> C:\TEMP, CALIBRE_TEMP_DIR -> A:\TEMP

Fires up Calibre and it works - and so does Library Codes!!

I canna be bothered with the last combination - we all know both on the C: drive works.

So, back to my earlier idea...

Something in Library Codes writes to the Windows Temp directory, then reads from C:\Temp. Fine if the Temp directory is C:\Temp, but not if Windows Temp -> A:\Temp.

Alutian
alutian is offline   Reply With Quote
Old 01-13-2016, 06:42 PM   #53
DaltonST
Deviser
DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.
 
DaltonST's Avatar
 
Posts: 883
Karma: 71334
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
Quote:
Originally Posted by alutian View Post
Something in Library Codes writes to the Windows Temp directory, then reads from C:\Temp. Fine if the Temp directory is C:\Temp, but not if Windows Temp -> A:\Temp.

Alutian

@Alutian:

Yes, Library Codes does its magic by downloading data from multiple places on the internet to get different data to use to derive various Library Codes. It stores downloaded data temporarily in a temporary file, processes it, deletes it, and uses the processed results to update metadata.db table identifiers and custom columns for DDC and LCC.

Standard, generic Python functionality for OS temporary files is used.

In short, yes, Library Codes creates a generic OS (very) temporary file for each book it is processing.

Quote:
The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables
Quote:
Python searches a standard list of directories to find one which the calling user can create files in. The list is:
  1. The directory named by the TMPDIR environment variable.
  2. The directory named by the TEMP environment variable.
  3. The directory named by the TMP environment variable.
  4. A platform-specific location:
    • On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
    • On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
  5. As a last resort, the current working directory.


DaltonST

Last edited by DaltonST; 01-13-2016 at 06:50 PM. Reason: Added quote from Python documentation
DaltonST is offline   Reply With Quote
Old 01-13-2016, 06:54 PM   #54
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,827
Karma: 7214735
Join Date: Mar 2012
Location: Sydney Australia
Device: none
FWIW : Library Codes, being part of Calibre, should surely be reading and writing its temporary files to the location referenced by CALIBRE_TEMP_DIR

I think CALIBRE_TEMP_DIR defaults to the System User TEMP location, so if System User TEMP is referencing A:\TEMP and CALIBRE_TEMP_DIR isn't set, then I would have thought Library Codes should be reading and writing to A:\TEMP.

BR

Last edited by BetterRed; 01-13-2016 at 07:18 PM. Reason: User replaced System :smack:
BetterRed is offline   Reply With Quote
Old 01-13-2016, 06:58 PM   #55
DaltonST
Deviser
DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.
 
DaltonST's Avatar
 
Posts: 883
Karma: 71334
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
@BR:

Wrong.

Calibre.exe has security that Library Codes does not have. LC cannot write files to everywhere that Calibre can write files to.

LC uses add-on Python packages that Calibre does not use.

The user must set the Environment Variables used by and documented in Python, and stated below.


Quote:
The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables

Python searches a standard list of directories to find one which the calling user can create files in. The list is:

The directory named by the TMPDIR environment variable.
The directory named by the TEMP environment variable.
The directory named by the TMP environment variable.
A platform-specific location:
On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
As a last resort, the current working directory.
DaltonST

Last edited by DaltonST; 01-13-2016 at 07:12 PM. Reason: typo.
DaltonST is offline   Reply With Quote
Old 01-13-2016, 07:16 PM   #56
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,827
Karma: 7214735
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaltonST View Post
@BR:

Wrong.
If you say so, but I would point out that the EPUBSplit PI reads and writes it's temporary files to the location referenced by CALIBRE_TEMP_DIR. There may be other PI's that do likewise.

But my post was wrong on another count - I mentioned System TEMP, that should have been User TEMP of course

But the question stands - why isn't the PI working when the User TEMP location isn't the Default - %USERPROFILE%\AppData\Local\Temp

BR
BetterRed is offline   Reply With Quote
Old 01-13-2016, 07:36 PM   #57
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,827
Karma: 7214735
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Long shot - if TEMP is on drive A:, could something be thinking FAT (as in floppy and diskette). And that something needs something that FAT can't handle - like hard or symbolic links or alternate data streams (file forks) and such.

Added : I raised this because when I had a RAM drive I made it X:, I have a vague memory of being 'warned' off using A: or B:

BR

Last edited by BetterRed; 01-14-2016 at 01:26 AM.
BetterRed is offline   Reply With Quote
Old 01-14-2016, 09:23 AM   #58
DaltonST
Deviser
DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.DaltonST knows who John Galt is.
 
DaltonST's Avatar
 
Posts: 883
Karma: 71334
Join Date: Aug 2013
Location: Texas
Device: 8" Windows 10 Tablet
Quote:
Originally Posted by alutian View Post
OK. RAMDrive A: back online.

Windows Temp -> A:\TEMP, CALIBRE_TEMP_DIR -> C:\TEMP

Fires up Calibre and it works... but no Library Codes

Windows Temp -> A:\TEMP, CALIBRE_TEMP_DIR -> A:\TEMP

Fires up Calibre and it works... but no Library Codes

Windows Temp -> C:\TEMP, CALIBRE_TEMP_DIR -> A:\TEMP

Fires up Calibre and it works - and so does Library Codes!!

I canna be bothered with the last combination - we all know both on the C: drive works.

So, back to my earlier idea...

Something in Library Codes writes to the Windows Temp directory, then reads from C:\Temp. Fine if the Temp directory is C:\Temp, but not if Windows Temp -> A:\Temp.

Alutian
@Alutian:

Did you update your Environment Variables that Python uses to force temporary files to go where you want them to go? Especially TMPDIR, since that is the first place it tries before moving down its list of places to check.

Also, since you use Windows, and per the Python documentation, it would be a good idea for you to physically delete c:\temp and c:\tmp. That would force it into '\temp' and '\tmp'.

Quote:
The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables

Python searches a standard list of directories to find one which the calling user can create files in. The list is:

  • The directory named by the TMPDIR environment variable.
  • The directory named by the TEMP environment variable.
  • The directory named by the TMP environment variable.
  • A platform-specific location:
    On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
  • On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
  • As a last resort, the current working directory.
CALIBRE_TEMP_DIR only is used by plugins that use only Calibre APIs and native Calibre Methods.

Some people naively think that all plug-ins can be lumped together as "a plug-in", and the same rules apply to all of them. Not so.

My Library Codes, QuarantineAndScrub, Multi-Column Search, English Noun Frequenies, CALM, Author Book Count, and Author Book Count Hierarchy add-ons and plug-ins do not fall into that category. At all. To the extent they use Calibre APIs and native Calibre Methods, of course they automatically use CALIBRE_TEMP_DIR. Otherwise, generic Python rules are in play. Hence, TMPDIR etc. as documented above (and soon to be in the Original Posts of all of my plug-ins that create temporary files other than through native Calibre Methods).



DaltonST

Last edited by DaltonST; 01-14-2016 at 09:44 AM.
DaltonST is offline   Reply With Quote
Old 01-14-2016, 10:17 AM   #59
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 8,827
Karma: 7214735
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Windows has two sets of Environment variables - System and User, and both normally have entries for TMP and TEMP, viz:

Click image for larger version

Name:	Capture.JPG
Views:	132
Size:	77.1 KB
ID:	145531

BR
BetterRed is offline   Reply With Quote
Old 01-16-2016, 05:33 AM   #60
jemsoo7
Junior Member
jemsoo7 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Device: none
Did for a test copied the working LC Calibre2 (64bit) folder C:\Program Files\Calibre2 and folder settings C:\Users\jemsoo7\AppData\Roaming\calibre\plugins into 2 versions of calibre portable. ONE from portableappz.blogspot (which date 2014) but is supposed to work fine with latest version of both 64bit and 32bit (as stated on the site), the other in calibre-portable version (default calibre website 2016 version).

The portableappz.blogspot version works fine it launches with LC running fine with all other plugins. The other one simply don't show LC ONLY.... other plugins works fine.

these 2 compiled version of calibre-portable.exe from calibre default website and calibrePortable.exe from portableappz.blogspot treat the 2 folders differently and allows LC plugin to run fine in one and not the other.... strange

Portableappz.blogspot uses an ini file in the folder of portable softs this one has this:

[CalibrePortable]
CheckRegWrite=true
AllowMultipleInstances=false
Library=Users\jemsoo7\Downloads\CalibrePortable\1_ 2\Library
DisableSplashScreen=false
SplashScreenName=

if i put Library=C:\Users\jemsoo7\Downloads\CalibrePortable \1_2\Library instead i get the python error "u' :" stated above by Alutian here and it does not load....

Hope this can add some light to this mystery.... but so far i can use the portableappz.blogspot version its working fine.... The folder structure are somewhat different as shown in the photo below!

not working for me: has change environment variable in user and added portable path in PATH as proposed by alutian.
Attached Thumbnails
Click image for larger version

Name:	calibre update plug 21.jpg
Views:	116
Size:	117.9 KB
ID:	145577  
jemsoo7 is offline   Reply With Quote
Reply

Tags
ddc, dewey decimal, lcc, library of congress, oclc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 403 07-29-2017 01:19 PM
[GUI Plugin] Consolidate All Library Metadata (CALM) DaltonST Plugins 188 06-09-2017 11:20 AM
[GUI Plugin] SmartEject JimmXinu Plugins 34 10-12-2016 11:37 AM
[GUI Plugin] Astro-ph iatheia Plugins 14 07-25-2015 11:41 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 01:00 PM.


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