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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 08-29-2011, 04:24 PM   #406
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:
EXTH item: 503 - UpdatedTitle - 0 - , and when opened in kindle, showed it as being untitled...
What did I do wrong, and how can I fix it?
- 0 - means zero length. That just means you didn't put anything in the exth data field. Fire up mobi2mobi-gui and do it again.... by selecting 503 - Updated Title (in the exth type dropdown) and then typing the desired title in the exth data field. Make sure the checkbox to the right of the exth data field is checked and then click convert.

Take careful note of the "Output File" field. This is the file you will need to load on your device. If you're just overwriting the file ("Output File" = "Opened File") then it's a no-brainer. But if they're different... you're creating a second file and the "Output File" name is the one with changed data. The Input File will of course be the unchanged original.
DiapDealer is online now   Reply With Quote
Old 09-05-2011, 04:09 AM   #407
Bryan790
Banned
Bryan790 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2011
Device: Bryan790
Quote:
Originally Posted by DiapDealer View Post
- 0 - means zero length. That just means you didn't put anything in the exth data field. Fire up mobi2mobi-gui and do it again.... by selecting 503 - Updated Title (in the exth type dropdown) and then typing the desired title in the exth data field. Make sure the checkbox to the right of the exth data field is checked and then click convert.

Take careful note of the "Output File" field. This is the file you will need to load on your device. If you're just overwriting the file ("Output File" = "Opened File") then it's a no-brainer. But if they're different... you're creating a second file and the "Output File" name is the one with changed data. The Input File will of course be the unchanged original.
If the output file is one of the input files, should i sort copies to a temporary file?
Bryan790 is offline   Reply With Quote
Advert
Old 10-24-2011, 01:28 AM   #408
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Calibre and Mobi2Mobi

Hello everybody,

I have a small book library with a few books, some of them having large titles. I have noticed on one of them that reconverting it to mobi using Calibre and then trying to modify it in Mobi2Mobi result in the following error:

Quote:
bogus database name! is this really a PalmOS file? at Palm/PDB.pm line 537.
The title of course is a lot larger then the 32 characters, it is in fact 52 characters long. I have already posted it as a bug on Calibre, but I got the reply that it's not a Calibre issue, but a Mobi2Mobi one.
I know I could anytime use a smaller title, but it's just annoying to have such a limitation.
The weird thing is the same thing don't happen to other books with long names, just with one. Maybe you can help me figure this thing out...
adriantc is offline   Reply With Quote
Old 10-24-2011, 04:53 AM   #409
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by adriantc View Post
Hello everybody,

I have a small book library with a few books, some of them having large titles. I have noticed on one of them that reconverting it to mobi using Calibre and then trying to modify it in Mobi2Mobi result in the following error:



The title of course is a lot larger then the 32 characters, it is in fact 52 characters long. I have already posted it as a bug on Calibre, but I got the reply that it's not a Calibre issue, but a Mobi2Mobi one.
I know I could anytime use a smaller title, but it's just annoying to have such a limitation.
The weird thing is the same thing don't happen to other books with long names, just with one. Maybe you can help me figure this thing out...
Are you really using the Palm/PDB.pm file in the mobi2mobi distribution? I cannot find this error message in this file.

It is the reading of the file that fails so this is not a problem with mobi2mobi since mobi2mobi uses standard Perl modules (patched a bit).
tompe is offline   Reply With Quote
Old 10-24-2011, 05:11 AM   #410
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Could you please be more specific when you say Palm/PDB.pm file?

I use the mobi book file and the mobi2mobi.exe and I run it from cmd. Other then that nothing. For other long titled books, it works just great.

I can provide you with the book file in question... Do you want it in a PM?
adriantc is offline   Reply With Quote
Advert
Old 10-24-2011, 07:15 AM   #411
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
I suspect you're trying to force all 52 characters into the Palm Database Name. Don't do that. Palm Db names have to be 32 bytes or less (it doesn't matter if your title is longer than that). Put the full title in an EXTH record (type 503). Devices/apps will use that for the metadata. They will only fall back on the Palm database name if there is no full title elsewhere in the mobi.
DiapDealer is online now   Reply With Quote
Old 10-24-2011, 07:20 AM   #412
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Quote:
Originally Posted by DiapDealer View Post
I suspect you're trying to force all 52 characters into the Palm Database Name. Don't do that. Palm Db names have to be 32 bytes or less (it doesn't matter if your title is longer than that). Put the full title in an EXTH record (type 503). Devices/apps will use that for the metadata. They will only fall back on the Palm database name if there is no full title elsewhere in the mobi.
I know about that limitation and I think Calibre may write a larger title, but there is no way to be sure since there is no way to access the metadata... I get the error I told you about even if I don't try to modify the metadata, only read it. Not to mention I also get that error if I try to modify it. So as far as mobi2mobi is concerned the file is ruined.

Again, the weird thing it doesn't happen for all large title files... I have reconverted another large title book in Calibre and it works just great in mobi2mobi.
adriantc is offline   Reply With Quote
Old 10-24-2011, 07:29 AM   #413
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
What version of calibre?
DiapDealer is online now   Reply With Quote
Old 10-24-2011, 07:32 AM   #414
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Calibre v0.8.23... Kovid Goyal said it's not a Calibre bug and I think it is true since converting a book with a large title (one or two less characters then the one I have problem with) works just great. He thinks it's a bug in mobi2mobi...
adriantc is offline   Reply With Quote
Old 10-24-2011, 07:39 AM   #415
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:
I know about that limitation and I think Calibre may write a larger title, but there is no way to be sure since there is no way to access the metadata... I get the error I told you about even if I don't try to modify the metadata, only read it. Not to mention I also get that error if I try to modify it. So as far as mobi2mobi is concerned the file is ruined.
You could see if Mobiunpack.py will unpack the problem mobi(s). If it does, you could rebuild them with kindlegen or whatever. That would still leave tracking down where the bogus db name is coming from, of course. Were there any special/unusual characters in the title before you modified it with mobi2mobi/calibre?

Also, have you tried using the command-line version of mobi2mobi to see if the problem might be limited to mobi2mobi-gui?

Can you give one of the titles that seem to trigger the problem (exactly as it was entered)?
DiapDealer is online now   Reply With Quote
Old 10-24-2011, 08:16 AM   #416
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Sorry, but I don't have Python installed. I use directly the mobi2mobi.exe.

Yes I have tried both versions, in fact the error I get is in cmd not in gui... In gui I only get an exception.

This is the exact title: The Demon-Haunted World: Science as a Candle in the Dark

If for example I only write The Demon-Haunted World and reconvert in calibre, the file works great in mobi2mobi.
For example the title: Pale Blue Dot: A Vision of the Human Future in Space works just great if I reconvert it in Calibre.

In other words I only get the error when I try with a book reconverted using the title The Demon-Haunted World: Science as a Candle in the Dark.

Thank you!

Last edited by adriantc; 10-24-2011 at 08:23 AM.
adriantc is offline   Reply With Quote
Old 10-24-2011, 09:57 AM   #417
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
I get the exact same results you do. With Calibre 0.8.20 and 0.8.21. The mobiperl tools (or more specifically, the Palm/PDB.pm perl library) expects the Palm Database Name to be terminated with a null character otherwise you get the error you're getting:
Code:
# database names must include a terminating NUL.
die "bogus database name! is this really a PalmOS file?" unless $name =~ /.+\0/;
So maybe there are certain conditions in calibre conversions that result in a Palm Db Name that isn't null terminated when long titles are involved? Somewhere between 52 and 56 characters?
DiapDealer is online now   Reply With Quote
Old 10-24-2011, 10:07 AM   #418
adriantc
Member
adriantc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: Amazon Kindle Paperwhite (2015)
Quote:
Originally Posted by DiapDealer View Post
I get the exact same results you do. With Calibre 0.8.20 and 0.8.21. The mobiperl tools (or more specifically, the Palm/PDB.pm perl library) expects the Palm Database Name to be terminated with a null character otherwise you get the error you're getting:
Code:
# database names must include a terminating NUL.
die "bogus database name! is this really a PalmOS file?" unless $name =~ /.+\0/;
So maybe there are certain conditions in calibre conversions that result in a Palm Db Name that isn't null terminated when long titles are involved? Somewhere between 52 and 56 characters?
Is the null termination an official specification of the file type? Because if it is then it's a bug in Calibre...
adriantc is offline   Reply With Quote
Old 10-24-2011, 10:18 AM   #419
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by DiapDealer View Post
I get the exact same results you do. With Calibre 0.8.20 and 0.8.21. The mobiperl tools (or more specifically, the Palm/PDB.pm perl library) expects the Palm Database Name to be terminated with a null character otherwise you get the error you're getting:
Code:
# database names must include a terminating NUL.
die "bogus database name! is this really a PalmOS file?" unless $name =~ /.+\0/;
So maybe there are certain conditions in calibre conversions that result in a Palm Db Name that isn't null terminated when long titles are involved? Somewhere between 52 and 56 characters?
Sound plausible.

And just open file book file in a binary editor and check that there is a 0 in the end. If not then the file is not generated correctly.

Strangely enough the PDB.pm file I include with the mobipoicket distribution does not contain this check. The file on my Dabian machine have this check. It was so long time since I looked into this so I do not remember why I made a special PDB.pm file and why it was used. There was a reason. I think the standard one did not work for certain files. So the idea was that the one include should be used and looking at the code it seem to be used if running the Perl source. Strangely anough it seems not to be used in the packed Windows binary.
tompe is offline   Reply With Quote
Old 10-24-2011, 10:19 AM   #420
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 adriantc View Post
Is the null termination an official specification of the file type? Because if it is then it's a bug in Calibre...
I couldn't tell you that. I don't know the "official" Palmdoc header specs. But I can tell you that looking at some older calibre source, it appears that the Db name is being null terminated like the Perl module expects. I don't currently have any recent calibre source to check.
DiapDealer is online now   Reply With Quote
Reply

Tags
mobi2mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobiperl Mobiperl - Perl tools for handling MobiPocket files tompe Kindle Formats 890 01-17-2021 06:16 PM
Problem updating metadata (using mobi2mobi command line and gui) whitearrow Kindle Formats 3 12-05-2009 07:07 PM
Mobi2mobi GUI has died again/New version? AlexBell Kindle Formats 8 12-10-2008 08:13 PM
Mobi2Mobi Mobi2Mobi GUI Cover Art Help? huskies4all Kindle Formats 7 09-04-2008 11:31 AM
I seem to have killed Mobi2Mobi gui AlexBell Kindle Formats 8 09-02-2008 01:54 AM


All times are GMT -4. The time now is 08:48 PM.


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