Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

View previous topic View next topic Go down

Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  jay1661 on Tue Jan 15, 2013 10:07 am

I tried tagging different CBR files and it doesn't seem to work well. Tags are there, ComicTagger recognizes them, but ComicBookLover for iPad doesn't and present "Unknown" for tags
I thought that maybe it was CBL app's fault, but then I saw File -> View Raw Tags -> View Raw ComicBookLover Tags
There I saw something like this:
Code:
{  u'ComicBookInfo/1.0': {  u'credits': [],
                              u'genre': u'whatever',
                              u'publisher': u'whatever',
                              u'series': u'whatever',
                              u'tags': [],
                              u'title': u'whatever'},
    u'appID': u'ComicTagger/0.1',
    u'lastModified': u'2013-01-15 13:08:21.365058'}

I guess that this "u" character before every element is the key of the failing. I also tried Windows version of ComicTagger and saw the same thing. I'll try CLI method if that makes magic.

That "u" does not appear if I set ComicRack tags, just ComicBookLover.

P.S.: Great program though Smile


Last edited by jay1661 on Wed Jan 16, 2013 5:15 pm; edited 4 times in total

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  ComicTagger on Tue Jan 15, 2013 2:18 pm

If the files are truly CBR files (RAR archives), then that might be been the problem. For internal tagging, ComicBookLover supports only CBZ/ZIP files, and stores them in the "comment" area of the zip file.

For ComicTagger, I added experimental support for writing the tags to RAR, in this case using the RAR comment area. The first time you tried this with the GUI you might have had a popup mentioning this:

You are about to write a CBL tag block to a RAR archive!
While technically possible, no known reader can read those tags from RAR
yet.

If you would like this feature in the ComicBookLover apps, please go to their
forums and add your voice to a feature request!
http://forums.comicbooklover.com/categories/ipad-features
http://forums.comicbooklover.com/categories/mac-features

Try converting one of the CBRs in question to CBZ, and then see if ComcBookLover can read the tags.

If you want CBL to support their tags in RAR files, please post a message on their forums.



avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  jay1661 on Tue Jan 15, 2013 3:43 pm

Thanks a lot. Yes, I remember that dialog, but since I could reopen the file and see the tags I thought that it had been solved on an earlier version but the dialog remained there.

Ok, I'll try to convert the files (I hope there's something out there to do it automatically) and will write on ComicBookLover forums.

Why the hell are my comics on CBR!? Laughing

Thanks again and keep this good work.

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

ComicTagger under Linux - Hung when importing with ComicBookLover

Post  jay1661 on Wed Jan 16, 2013 12:20 am

That didn't work well either. I converted my CBR files to CBZ files using ComicRack. Also using this tool I tagged the files, as I saw ComicTagger was aware of these changes if I later opened the files.

So I used ComicTagger's CLI to copy CR tags to CBL's. Then I copied a file to the iPad, and when importing it to Library ComicBookLover hung.
I thought this could be because of having two different tag types at the same time. I removed ComicRack tags (after backing all files up) and tried copying a file to ComicBookLover on iPad. Hung again. I tried other files, just in case, same result.

I looked raw CBL metadata and still I can find that annoying "u". Could this be? Is this thing "u" thing supposed to be here?
I think the conversion to CBZ worked, as executing "file" returns that is a zipped file.
So the light points to ComicTagger, but I feel I'm the only one with this problem.

Tomorrow I'll test it on Windows, but I expect the same result. Should you have any ideas they would be welcome.

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  ComicTagger on Wed Jan 16, 2013 1:27 am

The 'u' indicates that it's a unicode string in Python. It doesn't present a problem at all for CBL on iPad, and I just double-checked.

Also, CBL doesn't know or care about the ComicRack tags, so that shouldn't be an issue.

I have seen in the past that CBL on both platforms does not handle some unexpected situations gracefully, and will hang, as you have been seeing.

I can test this myself with your data. Can you cut and past the output of the raw CBL tag dump of one of the files that causes this? Probably something will jump out at me, and I may have a bug to fix.

Thanks.
avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  DP812 on Wed Jan 16, 2013 2:18 am

I'm not sure how well ComicRack's converter works, I've never used it myself (because it's sadly not Mac compatible yet). But there's a free comic reader called Jomic, I think it's available on Windows as well as Mac, and it can convert CBR to CBZ.

Another note, if you're using CBL so that you can have your books available on your iPad, I'm pretty sure ComicRack has an iOS app in the works. Although I have no idea when it will be ready or if they've even started work on it yet, so you may not want to wait.

DP812

Posts : 74
Join date : 2012-12-08

View user profile

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  jay1661 on Wed Jan 16, 2013 7:25 am

An example:
Code:
{  u'ComicBookInfo/1.0': {  u'credits': [],
                              u'genre': u'Super-Hero: Vigilantes/Ant-Heroes',
                              u'issue': u'1',
                              u'numberOfIssues': 100,
                              u'publisher': u'Image Comics',
                              u'series': u'SPAWN',
                              u'tags': [],
                              u'volume': 1},
    u'appID': u'ComicTagger/0.1',
    u'lastModified': u'2013-01-16 05:00:00.825346'}

Another example:
Code:
{  u'ComicBookInfo/1.0': {  u'credits': [],
                              u'genre': u'Crime',
                              u'issue': u'1',
                              u'numberOfIssues': u'14',
                              u'publisher': u'Image Comics',
                              u'series': u'Sam & Twitch',
                              u'tags': [],
                              u'volume': u'1'},
    u'appID': u'ComicTagger/0.1',
    u'lastModified': u'2013-01-16 04:33:51.267375'}

Both of them have both ComicRack and ComicBookLover tags.

Yes DP812, I'm aware of that upcoming version. Yesterday I watched a video dated on december 2012 of a quite functional ComicRack iOS version. It's just that I have more spare time that usual this week, and I wanted to leave things done. When that app comes out I'll test it for sure. Much better If things can be simplified and work out of the box.


*** UPDATE ***
It's because of the XML that ComicRack embeds in files.
I have renamed a CBZ to ZIP. Then I have opened it and deleted that XML. Finally renamed it to CBZ again and transferred to ComicBookLover. Tags are there wonderfully.

Now I have to test if deleting that XML breaks something for ComicRack (I set an option to use file comments, not to use a file inside de CBZ), and if not, I have to find a way to delete all the XMLs easily.

In conclusion, ComicTagger does the job nicely. All my complains come from other tools. This must be clear at this point.
Thanks!

*** UPDATE 2 *** This is useless. Deleting that XML doesn't solve anything.

I have made a script in Linux (in bash) that makes the following recursively for just CBZ files in the current directory and those under it.
Code:
#!/bin/bash

# Searches and renames recursively files with .cbz extension with the same name but .zip extension (to be able to manipulate files).
find . -name "*.cbz" -exec rename -v 's/\.cbz$/\.zip/i' {} \;

# Recursively searches those ZIP files and deletes "ComicInfo.xml" from inside.
find . -type f -name "*.zip" -exec zip -d {} \*.xml \;

# Searches and renames recursively files with .zip extension with the same name but .cbz extension
find . -name "*.zip" -exec rename -v 's/\.zip$/\.cbz/i' {} \;

*** UPDATE 3 ***
I still have some issues with some of the CBZ files not being processed by ComicBookLover...


Last edited by jay1661 on Thu Jan 17, 2013 10:54 am; edited 3 times in total

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

Found the problem

Post  jay1661 on Wed Jan 16, 2013 5:25 pm

I found where the problem is. First time, it was because of my files were CBR and ComicBookLover didn't love tags on CBR files.
So I converted the files to CBZ so that it could work. And after realizing that having a XML inside de CBZ was also too much for ComicBookLover I had one file that worked, and was imported with no problem. But it was the only one.
That was a comic file whose tags were saved from GUI. These are the metadata:
Code:
{  u'ComicBookInfo/1.0': {  u'credits': [],
                              u'genre': u'Super-Hero: Vigilantes/Ant-Heroes',
                              u'issue': u'1',
                              u'numberOfIssues': 100,
                              u'publisher': u'Image Comics',
                              u'series': u'SPAWN',
                              u'tags': [],
                              u'volume': 1},
    u'appID': u'ComicTagger/0.1',
    u'lastModified': u'2013-01-16 05:00:00.825346'}

All the others' CBL metadata were copied using the CLI. These are the metadata:
Code:
{  u'ComicBookInfo/1.0': {  u'credits': [],
                              u'genre': u'Super-Hero: Vigilantes/Ant-Heroes',
                              u'issue': u'2',
                              u'numberOfIssues': u'100',
                              u'publisher': u'Image Comics',
                              u'series': u'SPAWN',
                              u'tags': [],
                              u'volume': u'1'},
    u'appID': u'ComicTagger/0.1',
    u'lastModified': u'2013-01-16 04:33:51.873540'}73540'}

The first one works, the others don't. There's something when copying tags on CLI that manage numberOfIssues and volume as string instead of numbers. That has to be the key of my problem. I'm unable to see any further.

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  ComicTagger on Wed Jan 16, 2013 5:29 pm

Ah, very good find. I haven't actually tested a lot with the CBL apps, but this looks like the problem. I will look into it, and have a fix for the next release.
avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  jay1661 on Thu Jan 17, 2013 10:21 am

Don't bother trying to find it. I just did it and test it.

I modified comicbookinfo.py, in def createJSONDictionary( self, metadata ):
Changed the original block starting on line 114
Code:
      assign( 'series', metadata.series )
      assign( 'title', metadata.title )
      assign( 'issue', metadata.issue )
      assign( 'publisher', metadata.publisher )
      assign( 'publicationMonth', metadata.month )
      assign( 'publicationYear', metadata.year )
      assign( 'numberOfIssues', metadata.issueCount )
      assign( 'comments', metadata.comments )
      assign( 'genre', metadata.genre )
      assign( 'volume', metadata.volume )
      assign( 'numberOfVolumes', metadata.volumeCount )
      assign( 'language', utils.getLanguageFromISO(metadata.language) )
      assign( 'country', metadata.country )
      assign( 'rating', metadata.criticalRating )
      assign( 'credits', metadata.credits )
      assign( 'tags', metadata.tags )
to:
Code:

      assign( 'series', metadata.series )
      assign( 'title', metadata.title )
      assign( 'issue', metadata.issue )
      assign( 'publisher', metadata.publisher )
      if metadata.month is not None:
         assign( 'publicationMonth', int( metadata.month ) )
      if metadata.year is not None:
         assign( 'publicationYear', int( metadata.year ) )
      if metadata.issueCount is not None:
         assign( 'numberOfIssues', int( metadata.issueCount ) )
      assign( 'comments', metadata.comments )
      assign( 'genre', metadata.genre )
      if metadata.volume is not None:
         assign( 'volume', int (metadata.volume) )
      if metadata.volumeCount is not None:
         assign( 'numberOfVolumes', int( metadata.volumeCount ) )
      assign( 'language', utils.getLanguageFromISO(metadata.language) )
      assign( 'country', metadata.country )
      assign( 'rating', metadata.criticalRating )
      assign( 'credits', metadata.credits )
      assign( 'tags', metadata.tags )

This way, values that are originally integers are used as that. Now it works like a charm and I have learnt a bit of Python Cool

jay1661

Posts : 6
Join date : 2013-01-15

View user profile

Back to top Go down

Re: Illegal metadata for CBL tag format (0.9.4 on Linux/Windows) *PROBLEM FOUND*

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum