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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-30-2016, 03:38 AM   #1
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Problem copying a date column to other date column

Hi,

I suppose I should put this at github but I don't know really how and I'm not sure if it's a fault or I'm doing something wrong.

When I'm trying to copy a date column to other one of the same type (but with other format), through S&R, I get the following error:

Spoiler:

calibre, version 2.56.0
ERROR: Falló: 'NoneType' object is not iterable

Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\metadata_bulk.py", line 122, in do_it
File "site-packages\calibre\gui2\dialogs\metadata_bulk.py", line 291, in do_all
File "site-packages\calibre\db\cache.py", line 57, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1058, in set_field
File "site-packages\calibre\db\write.py", line 512, in set_books
File "site-packages\calibre\db\write.py", line 512, in <dictcomp>
File "site-packages\calibre\db\write.py", line 70, in adapt_datetime
File "site-packages\calibre\utils\date.py", line 134, in parse_date
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 748, in parse
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 310, in parse
TypeError: 'NoneType' object is not iterable



And nothing is copied.

Thanks in advance

Last edited by Terisa de morgan; 04-30-2016 at 03:39 AM. Reason: A clearer explanation (I think)
Terisa de morgan is offline   Reply With Quote
Old 04-30-2016, 04:25 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You will need to wait for chaley to comment, this is his bailiwick, but, off the top of my head, I'd guess that happens when the replace expression is empty.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-30-2016, 04:34 AM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, Kovid. I've checked that and all the books have the origin date fulfilled and there are data at the test result, but the error is the same.
Terisa de morgan is offline   Reply With Quote
Old 04-30-2016, 07:50 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,337
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This might be another manifestation of the bad-day-in-date problem we fixed yesterday. If you are running calibre from source, update and see if the problem goes away.

I tried it using the latest source. Here is the screen capture of the S/R.
Click image for larger version

Name:	Clipboard01.jpg
Views:	274
Size:	156.3 KB
ID:	148337

The two dates have different format specifiers.

If you post your S/R screen and the formats of the two dates then I can look further.
chaley is offline   Reply With Quote
Old 04-30-2016, 11:31 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm not running from source but, if you tell me which file I should download from git (I have the tar file for the last release) I can try. Anyway, my S&R screen looks exactly the same than the screen you've posted, with the origin field "pubdate" and the destine field "#fpb" (dd/MM/yyyy).

If it's a known issue, I'll wait for the next release (I see I have my good aim for bugs when I'm not at work too )

Last edited by Terisa de morgan; 04-30-2016 at 11:31 AM. Reason: Typo
Terisa de morgan is offline   Reply With Quote
Advert
Old 04-30-2016, 12:06 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,337
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
I'm not running from source but, if you tell me which file I should download from git (I have the tar file for the last release) I can try.
src/calibre/utils/date.py

The issue fixed is that dates expressed without a day-of-the-month get that day from the current month. That day can be out-of-range for the actual month in the date. For example, the 30th and 31st are out-of-range for leap-February, and the 29th is out-or-range for non leap-February. And so on.
chaley is offline   Reply With Quote
Old 05-01-2016, 02:07 AM   #7
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)
Quote:
Originally Posted by Terisa de morgan View Post
I suppose I should put this at github but I don't know really how and I'm not sure if it's a fault or I'm doing something wrong.
calibre has GitHub issues disabled. You need to use the bugtracker on Launchpad.
eschwartz is offline   Reply With Quote
Old 05-01-2016, 02:26 AM   #8
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by chaley View Post
src/calibre/utils/date.py

The issue fixed is that dates expressed without a day-of-the-month get that day from the current month. That day can be out-of-range for the actual month in the date. For example, the 30th and 31st are out-of-range for leap-February, and the 29th is out-or-range for non leap-February. And so on.
I'm running from source with the new date.py, but I still have the problem. This is the debug trace:

Spoiler:

Traceback (most recent call last):
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\gui2\dialogs\metadata_bulk.py", line 122, in do_it
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\gui2\dialogs\metadata_bulk.py", line 291, in do_all
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\cache.py", line 57, in call_func_with_lock
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\cache.py", line 1058, in set_field
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 512, in set_books
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 512, in <dictcomp>
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 70, in adapt_datetime
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\utils\date.py", line 131, in parse_date
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 748, in parse
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 310, in parse
TypeError: 'NoneType' object is not iterable
Terisa de morgan is offline   Reply With Quote
Old 05-01-2016, 02:29 AM   #9
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by eschwartz View Post
calibre has GitHub issues disabled. You need to use the bugtracker on Launchpad.
Thank you, as you can see, I didn't know how to report it
Terisa de morgan is offline   Reply With Quote
Old 05-01-2016, 02:47 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,337
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
I'm running from source with the new date.py, but I still have the problem. This is the debug trace:

Spoiler:

Traceback (most recent call last):
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\gui2\dialogs\metadata_bulk.py", line 122, in do_it
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\gui2\dialogs\metadata_bulk.py", line 291, in do_all
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\cache.py", line 57, in call_func_with_lock
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\cache.py", line 1058, in set_field
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 512, in set_books
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 512, in <dictcomp>
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\db\write.py", line 70, in adapt_datetime
File "D:\Lectores\calibre\Codigo\calibre-2.56.0\src\calibre\utils\date.py", line 131, in parse_date
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 748, in parse
File "site-packages\python_dateutil-2.2-py2.7.egg\dateutil\parser.py", line 310, in parse
TypeError: 'NoneType' object is not iterable
All I can see from that exception trace is that the date parser wasn't able to handle what was passed into it. I can repeat this by replacing the date with something that isn't recognizable as a date. For example, if I use French words for the month then I get the same exception.

Can you give me some source values and the S/R expression you are using?
chaley is offline   Reply With Quote
Old 05-01-2016, 03:08 AM   #11
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Well, calibre is using Spanish words for months (I suppose because of the interface language: "abr" instead of "apr"). Is there any way to change that? Because it is for pubdate, that I don't know how to change the format.
Terisa de morgan is offline   Reply With Quote
Old 05-01-2016, 03:13 AM   #12
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, I found the tweak for displaying it (it was set at the default value), changed it and it works now. Sorry about the inconvenience.
Terisa de morgan is offline   Reply With Quote
Old 05-01-2016, 03:23 AM   #13
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,337
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@Terisa de morgan: you can leave the tweak as it was if you use something like the following for the S/R. The trick is to use a template as the source. The template uses the raw_field function to avoid any formatting of the date.

This technique has a second advantage beyond "working": all the date fields are available when setting the destination. This means that if the source has the value 2016-3-27 but displays as March 2016, the destination will still have the "27" to work with.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	261
Size:	162.6 KB
ID:	148353  
chaley is offline   Reply With Quote
Old 05-01-2016, 03:27 AM   #14
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much, I'll change the expression in that way, as I would never have thought about the displayed format as a problem And I've learned something I didn't know for S&R => template
Terisa de morgan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with S/R from text column to a date column belton180 Library Management 2 04-02-2014 05:23 AM
Date column amok777 Library Management 4 02-06-2014 10:13 PM
Date Added column? Can I set date when book added to library? fitzhugh Calibre 4 06-03-2012 05:42 PM
custom date column from two state column Dopedangel Library Management 7 01-03-2012 08:20 AM
'Date' Column Stinger Calibre 8 06-08-2010 01:56 AM


All times are GMT -4. The time now is 05:20 PM.


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