Tap Mapping comma as semi-colon as of 2.40- did not on 2.39

Bug #1503526 reported by JP on 2015-10-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

As of the Tag Mapping of imported book, using commas worked just find to map multiple tags to one.
Since the 2.40 update a week later adding Tag Mapping as a Tool on existing entries, the comma now "maps" as a semicolon creating a single tag. It was far better before.
In fact, using the Tag Mapper tool on existing books, it has now changed a LOT of my books because of the setup.

3 Examples (of many),

as of 2.39
TAG -----> Change to: (the comma created separate tags)
Historical Fiction -----> Historical, FICTION
steampunk ----> Fantasy/Paranormal/Sci-Fi, Steampunk
Biology -----> Biology, SCIENCE

These became the new tags, 6 total new, covering all categories to which I wanted the original to map.

NOW 2.40

has Biology and SCIENCE -----> Biology;SCIENCE and SCIENCE
has Historical and FICTION -----> Historical;FICTION and FICTION
has OR imports steampunk OR Steampunk ------> Fantasy/Paranormal/Sci-Fi; Steampunk

Before posting this, I created a test book with tags as noted under NOW 2.40 and imported it. It did import with the semicolon so this had to be an effect of the 2.40 update since it did not do that prior. I've been noticing it and thinking I lost my mind. I kept going back to Tag Mapping in both locations and retyping to insure the comma was not a semicolon until I figured this out with mass mapping jobs and my existing tags changing to have/add semicolon tags as noted.

Please, oh, please, oh, please fix this back.

Discovering the ability to change one tag to multiple tags was only found by a test but was perfect !
I wish I'd known the Tag Mapper tool was coming a week later. It was going to be a suggestion, but it showed up a week later after I did A LOT of work! But still I'm glad it's there.

I have some mapping suggestions, but I will post them separately under a specific heading so as not to mix issues with requests. Mapping is one of the BEST tools to be added to Calibre. I always wondered why the Goodread tag mapping feature wasn't expanded in such a manner. In fact, that will be a suggestion in a separate listing. Why not allow the Tag Mapper to overrule all metadata sources when downloading them as can be done with the Goodreads source (which has unique mapping fields)?

Calibre 240
Windows 7 64-bit

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Download full text (3.2 KiB)

Thank you.
Please forgive my horrific typos. I read it over even then, and it read
correctly then. I really shouldn't try to proofread at such a late hour.
On Oct 8, 2015 12:40 AM, "Kovid Goyal" <email address hidden> wrote:

> Fixed in branch master. The fix will be in the next release. calibre is
> usually released every Friday.
>
> status fixreleased
>
> ** Changed in: calibre
> Status: New => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1503526
>
> Title:
> Tap Mapping comma as semi-colon as of 2.40- did not on 2.39
>
> Status in calibre:
> Fix Released
>
> Bug description:
> As of the Tag Mapping of imported book, using commas worked just find to
> map multiple tags to one.
> Since the 2.40 update a week later adding Tag Mapping as a Tool on
> existing entries, the comma now "maps" as a semicolon creating a single
> tag. It was far better before.
> In fact, using the Tag Mapper tool on existing books, it has now changed
> a LOT of my books because of the setup.
>
> 3 Examples (of many),
>
> as of 2.39
> TAG -----> Change to: (the comma created separate tags)
> Historical Fiction -----> Historical, FICTION
> steampunk ----> Fantasy/Paranormal/Sci-Fi, Steampunk
> Biology -----> Biology, SCIENCE
>
> These became the new tags, 6 total new, covering all categories to
> which I wanted the original to map.
>
> NOW 2.40
>
> has Biology and SCIENCE -----> Biology;SCIENCE and
> SCIENCE
> has Historical and FICTION -----> Historical;FICTION
> and FICTION
> has OR imports steampunk OR Steampunk ------>
> Fantasy/Paranormal/Sci-Fi; Steampunk
>
> Before posting this, I created a test book with tags as noted under
> NOW 2.40 and imported it. It did import with the semicolon so this had
> to be an effect of the 2.40 update since it did not do that prior.
> I've been noticing it and thinking I lost my mind. I kept going back
> to Tag Mapping in both locations and retyping to insure the comma was
> not a semicolon until I figured this out with mass mapping jobs and my
> existing tags changing to have/add semicolon tags as noted.
>
>
> Please, oh, please, oh, please fix this back.
>
> Discovering the ability to change one tag to multiple tags was only
> found by a test but was perfect !
> I wish I'd known the Tag Mapper tool was coming a week later. It was
> going to be a suggestion, but it showed up a week later after I did A LOT
> of work! But still I'm glad it's there.
>
>
> I have some mapping suggestions, but I will post them separately under
> a specific heading so as not to mix issues with requests. Mapping is
> one of the BEST tools to be added to Calibre. I always wondered why
> the Goodread tag mapping feature wasn't expanded in such a manner. In
> fact, that will be a suggestion in a separate listing. Why not allow
> the Tag Mapper to overrule all metadata sources when downloading them
> as can be done with the Goodreads source (which has unique mapping
> fields)?
>
> Calibre 240
> Windows 7...

Read more...

JP (jecilop) wrote :

I've just installed the update to 2.41 and tried to run Tag Mapper on the books. I can only get an error.

Whether it is one book (random pick) or all books, the same error appears. Details are below. I haven't done anything differently from before. I just installed the update and tried to run Tag Mapper. I looked through my mapping to see if I put any stray notations in tags, but I do not see anything that would apply (that I know of). Again, same stuff as before the 2.40 update that suddenly mapped the comma as a semi-colon.

TypeError:Not a unicode string.
DETAILS:
calibre, version 2.41.0
ERROR: Unhandled exception: <b>TypeError</b>:Not a unicode string

calibre 2.41 [64bit] isfrozen: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && Favourites Menu && DOC Input && Read MP3 AudioBook metadata && Quick Preferences && EpubSplit && EpubMerge && Fantastic Fiction Adults && Search The Internet && Extract ISBN && User Category && Count Pages && Goodreads && Find Duplicates && Annotations && Quality Check && Hymn Reader && Reading List && Open With && Generate Cover && Modify ePub
Traceback (most recent call last):
  File "site-packages\calibre\gui2\actions\tag_mapper.py", line 28, in start_map
  File "site-packages\calibre\gui2\actions\tag_mapper.py", line 50, in do_map
  File "site-packages\calibre\ebooks\metadata\tag_mapper.py", line 69, in map_tags
  File "site-packages\calibre\ebooks\metadata\tag_mapper.py", line 35, in apply_rules
  File "<string>", line 5, in lower
TypeError: Not a unicode string

On a side note, time to get rid of a bunch of plug-ins I didn't realize I still had installed and never use.

JP (jecilop) wrote :

And you can likely tell from the last post that with calibre "frozen" nothing changed.
But I'm adding this just to confirm. I have the same number of tags before and after my mapping attempt.

I neglected to handle the case when there is a comma in the replacement
tag and more rules after the replacement rule, will be fixed in the next
release.

JP (jecilop) wrote :

Well, I've tried the Tag Mapping update in 2.42 many times in many ways not and find the same result - it locks up Calibre. I can't even import a book with the rules list in place without it locking up.

ATTEMPTS/TESTS:
1) Selected all (about 45,000 entries); ran Tag Mapper; locked up 3 hours. Left running to that's how I found it.
2) Tried on a single book thinking it might suddenly have problems with a large number of entries at once as I'm having problems with that on other things now. Single book also locked up.
3) Restart..ONLY Calibre and essentials running. Tried on one book. Same problem.
4) Created an entry with two tags I knew were in the rules. Ran Tag Mapper. It locked up.
5) Tried to map via import. This was my FIRST added book import since update to 2.42 with fix. I have successfully imported with "messed up comma/semicolon" issue prior to this. Single book locked up on import so I cannot import books. I tried more books. Same problem.
6) Ran a Test Rules - worked on one test simple phrase (such as "sea travel"} ; 2nd Test Rules run locked up when replacing a phrase with "&" in it (Literature & Fiction)
7) Made a backup copy of my .json file (at least I hope it was my custom one!!!!!!!!), then deleted ALL RULES for mapping on import. I was then able to import a book.

So, what could he problem be?

JP (jecilop) wrote :

TYPO: ......" tried the Tag Mapping update in 2.42 many times in many ways NOW..."

Kovid Goyal (kovid) wrote :

Attach your rule list and post the list of tags in some book you are trying to import that causes a hang.

JP (jecilop) wrote :

I installed the 2.42 update before getting to your email to send the file. I've tried the update and have NO PROBLEMS now.
I've even figured out how to manually edit the .json for the tag rules to make massive changes easier!
THANK YOU!!!!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers