Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-14-2016, 10:12 AM   #1876
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@nemiere: Huh, that's weird.

Try to redirect the KFXMeta output to a file, by tweaking linkss/bin/cover-extract (with a proper code editor that won't mess up line-endings), by switching L#115 from

Code:
${PYTHON} ${LINKSS_BINDIR}/kfxmeta.py "${last_read_kfx}" "${LINKSS_TMPFS_CACHE}/"
to
Code:
${PYTHON} ${LINKSS_BINDIR}/kfxmeta.py "${last_read_kfx}" "${LINKSS_TMPFS_CACHE}/" &> /mnt/us/linkss/kfxmeta.log
And check what linkss/kfxmeta.log has to say about that after trying to reopen this book...
NiLuJe is offline   Reply With Quote
Old 02-14-2016, 05:39 PM   #1877
nemiere
Member
nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 333762
Join Date: Aug 2011
Location: Madrid, Spain
Device: Kindle Voyage
Really weird. Contents of kfxmeta.log:
Code:
KFX Meta v1.1.N
Traceback (most recent call last):
  File "/mnt/us/linkss/bin/kfxmeta.py", line 421, in <module>
    main()
  File "/mnt/us/linkss/bin/kfxmeta.py", line 144, in main
    print('Decoding "{}"'.format(infile))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 32: ordinal not in range(128)
But: I have opened kterm (inside KUAL) and have tried:
Code:
# cd /mnt/us
# ./linkss/bin/kfxmeta.py "documents/Fool’s Errand (The Tawny Man Trilogy, Book 1)_B005JE1KD8.sdr/assets/metadata.kfx" ./
KFX Meta v1.1.N
Decoding "documents/Fool’s Errand (The Tawny Man Trilogy, Book 1)_B005JE1KD8.sdr/assets/metadata.kfx"
Extracting cover image to cover_raw_B005JE1KD8.jpg
Perhaps it's relevant kterm's value of LANG:
Code:
# echo $LANG
es_ES.utf8
nemiere is offline   Reply With Quote
Advert
Old 02-14-2016, 06:19 PM   #1878
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
You mean it appears to be sensitive to the current locale?
knc1 is offline   Reply With Quote
Old 02-14-2016, 06:24 PM   #1879
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@nemiere: Yaaaay...

Can't be it, the watchdog inherits the same env, LANG is set properly there too.
Plus, lab126 has a ldpreload hack whose sole purpose is making sure the env is always set locale-wise.

Best guess is being headless confuses Python... let's try that:

Code:
env PYTHONIOENCODING="utf-8" ${PYTHON} ${LINKSS_BINDIR}/kfxmeta.py "${last_read_kfx}" "${LINKSS_TMPFS_CACHE}/" &> /mnt/us/linkss/kfxmeta.log

Last edited by NiLuJe; 02-14-2016 at 06:34 PM.
NiLuJe is offline   Reply With Quote
Old 02-14-2016, 06:42 PM   #1880
nemiere
Member
nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 333762
Join Date: Aug 2011
Location: Madrid, Spain
Device: Kindle Voyage
Now it's working ok for my 3 books with non-ascii chars in filename! But I don't understand the whole thing behind this problem...
nemiere is offline   Reply With Quote
Advert
Old 02-14-2016, 07:27 PM   #1881
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@nemiere: Python 2's handling of unicode and encodings and how it's handled on different platforms/environment being a fantastic mess unless you take a crazy amount of extra precautions in your code? :]
NiLuJe is offline   Reply With Quote
Old 02-14-2016, 08:35 PM   #1882
44x2
41x4 9u4l17`´ 44xX2
44x2 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 2
"update your kindle" button greyed out

As the title says the button of my kindle pw2 is greyed out after I copied the installation file
Please me
44x2 is offline   Reply With Quote
Old 02-14-2016, 09:38 PM   #1883
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Per the instructions in the first post (yes, those instructions are there for a reason)...

Quote:
Originally Posted by NiLuJe View Post
Note that if you have KUAL set up and running, you're welcome to use our very own MR Package Installer, which may speed up the process if you're installing multiple things .
IMPORTANT: Remember that on FW >= 5.5.x, using MRPI is REQUIRED to install custom packages!
eschwartz is offline   Reply With Quote
Old 02-15-2016, 04:20 AM   #1884
nemiere
Member
nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 333762
Join Date: Aug 2011
Location: Madrid, Spain
Device: Kindle Voyage
Quote:
Originally Posted by NiLuJe View Post
@nemiere: Python 2's handling of unicode and encodings and how it's handled on different platforms/environment being a fantastic mess unless you take a crazy amount of extra precautions in your code? :]
Indeed. I have to study more on this area...

Anyway, @NiLuJe thanks alot for your work and help!
nemiere is offline   Reply With Quote
Old 02-15-2016, 07:53 AM   #1885
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@nemiere: Thanks for your detailed reports and tests :].
NiLuJe is offline   Reply With Quote
Old 02-15-2016, 07:56 AM   #1886
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@nemiere: Python 2's handling of unicode and encodings and how it's handled on different platforms/environment being a fantastic mess unless you take a crazy amount of extra precautions in your code? :]
Isn't Python one of those languages where (for utf8 conversions) you have to set **both** the locale (done, by the pre-loaded .so) and the code-page for the non-utf8 (not done, by the pre-loaded .so)?

The code page (notice the single byte error report) for code conversions in es_ES.utf8 is not the same as for that in en_GB.utf8 .
knc1 is offline   Reply With Quote
Old 02-15-2016, 08:05 AM   #1887
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@knc1: It's a mess, but in this case, it's simply the fact that being headless for some reason (AFAICT, it shouldn't if the env is sane, which it is, but, hey...) broke the stdout encoding autodetection. With a tty, it correctly inherits the utf-8 from the env, without one, it defaults to none -> ascii, which breaks because the rest of the code is going to great pains to make sure everything is either an utf-8 str, or an unicode object.

(We're not alone, and Python 3 is apparently much saner (in that respect, at least))
NiLuJe is offline   Reply With Quote
Old 02-15-2016, 08:34 AM   #1888
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
@knc1: It's a mess, but in this case, it's simply the fact that being headless for some reason (AFAICT, it shouldn't if the env is sane, which it is, but, hey...) broke the stdout encoding autodetection. With a tty, it correctly inherits the utf-8 from the env, without one, it defaults to none -> ascii, which breaks because the rest of the code is going to great pains to make sure everything is either an utf-8 str, or an unicode object.

(We're not alone, and Python 3 is apparently much saner (in that respect, at least))
Which is what I tried to say.
none -> ascii is correct for non-latin-1 English and wrong for Spanish.

It was just my guess about what the source of the problem was that was wrong. (not passed vs not specified).

= = = =

Meanwhile, in my own backyard - (I don't do the big snake stuff) -
You would not believe what Lab126 has done to the "standardized" extension library location(s) in their Lua install.
About the only thing the same is 'in current directory', I guess they couldn't be bothered to screw that up also.
knc1 is offline   Reply With Quote
Old 02-15-2016, 12:46 PM   #1889
nemiere
Member
nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 333762
Join Date: Aug 2011
Location: Madrid, Spain
Device: Kindle Voyage
Quote:
Originally Posted by NiLuJe View Post
Interesting summary of proper pythonic way of this mess.
nemiere is offline   Reply With Quote
Old 02-16-2016, 12:28 AM   #1890
thirdfloornorth
Junior Member
thirdfloornorth began at the beginning.
 
Posts: 3
Karma: 34
Join Date: Feb 2016
Device: Paperwhite 2
Can not get cover view to work

I just jailbroke my Paperwhite 2, 5.6.5. Installed Python, then the screen saver. Got the confirmation "Screen Saver Hack is Installed!"

Created a blank folder in the "linkss" folder named "cover".

Went into the settings in KUAL and told it "behavior: cover" and restarted the framework. Also rebooted the whole thing. Also, made sure my time was correct.

Tried opening a variety of books. Will not show the cover, still just the "screensaver hack installed!" image.

I know for "custom" images, your files have to follow certain guidelines for resolution and type. But what about for "last cover" covers that I put on the book myself using Calibre? Do they have to follow the same guidelines?

EDIT

Solution! It helps to read the ENTIRE instructions. For anyone else who has this problem... you probably forgot to unplug your Kindle while installing, OR you made the 'cover' folder when its best to use the built-in option to do so.
  • Run the 'Uninstall' bin included in the Python installation zip
  • Run the 'Uninstall' bin included in the Screen Saver installation zip
  • Re-transfer the correct Python and Screen Saver installation bins to your Kindle
  • UNPLUG YOUR KINDLE
  • Re-install both Python and Screen Saver
  • Go into the Screen Saver options in KUAL
  • Go to Screen Savers Behavior
  • Tell it you want Cover Mode
  • Re-start the Framework

Last edited by thirdfloornorth; 02-16-2016 at 01:22 AM. Reason: Problem Solved
thirdfloornorth is offline   Reply With Quote
Reply

Tags
kindle touch hacks, paperwhite, python, screensavers, touch


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing Kindle ScreenSavers Hack ratchetclank Kindle Developer's Corner 3 12-30-2015 09:59 PM
Is it impossible to hack screensavers in K4 4.1? nonfactor Kindle Developer's Corner 1 07-04-2012 07:17 PM
Help! Used screensaver hack- now all collections gone and no screensavers!!! kuklachica Amazon Kindle 1 01-16-2011 08:17 PM
Is a hack necessary to add screensavers? mldavis2 Amazon Kindle 4 10-29-2010 05:34 PM
Hack for screensavers on Kindle 2 KookyKathy Introduce Yourself 5 01-09-2010 11:16 PM


All times are GMT -4. The time now is 12:18 PM.


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