Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#28143 - [calibre] crash at start

Attached to Project: Community Packages
Opened by Chao WANG (wangchao) - Saturday, 28 January 2012, 10:40 GMT
Last edited by Giovanni Scafora (giovanni) - Sunday, 29 January 2012, 12:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Giovanni Scafora (giovanni)
Architecture i686
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After a fresh installation and configuration of calibre, I start it. Then it crashes. I have posted this issue in https://bbs.archlinux.org/viewtopic.php?id=134351.

$ calibre
QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'
[snip]
Segmentation fault

Additional info:
calibre and its dependencies are all lastest versions.
Also find python errors in dmesg, see blew
[ 4860.655466] python2[5418] general protection ip:b49720d1 sp:bffc7c62 error:0 in libQtGui.so.4.8.0[b4962000+22000]
[ 6224.465452] python2[5758]: segfault at 1000125 ip b5498b2a sp bfba7800 error 4 in sip.so[b5493000+16000]


Steps to reproduce:
open calibre from a terminal.
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Sunday, 29 January 2012, 12:51 GMT
Reason for closing:  Not a bug
Additional comments about closing:  After remove/install python2-dateutil, calibre works as expected.
Comment by Karol Błażewicz (karol) - Saturday, 28 January 2012, 11:14 GMT
Works for me on 32-bit Arch.

Not sure if it's helpful, but there's an option to restart Calibre in debug mode, so you can try that too.
Comment by Chao WANG (wangchao) - Saturday, 28 January 2012, 12:14 GMT
hi, @karol
Thanks for your feedback.
I find an option -v to make calibre verbose, but I get nothing than the same traceback as I mentioned in comment 0.
I also find a utility called `calibre-debug`, but I just don't know how to debug it. I run calibre-debug with some of its options like -d -g etc, but nothing more comes out.

ps. I also reinstall all my python and calibre related packages.Didn't work, either.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 28 January 2012, 12:46 GMT
I'm unable to reproduce with calibre 0.8.37-1 on x86_64.

Which version of Calibre is this?
What happens if you run it as "LC_ALL=C calibre"?
Comment by Chao WANG (wangchao) - Saturday, 28 January 2012, 13:10 GMT
I tried LC_ALL=C calibre, but no luck.
calibre 0.8.37-1 for i686.
Comment by Giovanni Scafora (giovanni) - Saturday, 28 January 2012, 13:57 GMT
As suggested by the upstream maintainer, following solves the problem.
LANG=en_US.UTF-8 calibre
Remember that you also have to update your /etc/rc.conf (e.g. about LOCALE)
Please, try it and let me know.
Comment by Chao WANG (wangchao) - Saturday, 28 January 2012, 14:11 GMT
This won't work. My locale has already set env variable LANG to en_US.UTF-8
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Comment by Giovanni Scafora (giovanni) - Saturday, 28 January 2012, 16:17 GMT
Have you installed python2-dateutil? which version?
Also, you can debug it with

$ gdb /usr/bin/python2
$ (gdb) run /usr/bin/calibre

or simply using calibre-debug (calibre-debug needs ipython).

If you cannot solve your problem yet, please report it to the upstream, because I cannot reproduce your issue on my local machines.
Comment by Chao WANG (wangchao) - Sunday, 29 January 2012, 03:07 GMT
[chaowang@arch ~]$ gdb /usr/bin/python2
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python2...(no debugging symbols found)...done.
(gdb) run /usr/bin/calibre
calibre calibre-customize calibre-mount-helper calibre-server calibredb
calibre-complete calibre-debug calibre-parallel calibre-smtp
(gdb) run /usr/bin/calibre
Starting program: /usr/bin/python2 /usr/bin/calibre
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xac1f5b40 (LWP 2141)]
[New Thread 0xaad26b40 (LWP 2142)]
[New Thread 0xaa3ffb40 (LWP 2143)]
[New Thread 0xa9091b40 (LWP 2144)]
[New Thread 0xa8768b40 (LWP 2145)]
[New Thread 0xa7f67b40 (LWP 2146)]
[New Thread 0xa7766b40 (LWP 2147)]
[New Thread 0xa6f65b40 (LWP 2148)]
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

[New Thread 0xa5074b40 (LWP 2150)]
QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'

Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/library/delegates.py", line 121, in displayText
return format_date(qt_to_dt(d, as_utc=False), self.format)
File "/usr/lib/calibre/calibre/utils/date.py", line 103, in qt_to_dt
return parse_date(o, assume_utc=True, as_utc=as_utc)
File "/usr/lib/calibre/calibre/utils/date.py", line 80, in parse_date
dt = parse(date_string, default=default, dayfirst=parse_date_day_first)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/usr/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
return list(cls(s))
TypeError: iter() returned non-iterator of type '_timelex'


Program received signal SIGSEGV, Segmentation fault.
0xb7f16ce7 in PyObject_GC_UnTrack () from /usr/lib/libpython2.7.so.1.0
(gdb)

Any help?
Comment by Chao WANG (wangchao) - Sunday, 29 January 2012, 03:09 GMT
python2-dateutil 1.5-2
Comment by Alexander F. Rødseth (xyproto) - Sunday, 29 January 2012, 09:04 GMT
According to this issue: https://github.com/Saaspire/sharpy/issues/1
"TypeError: iter() returned non-iterator of type '_timelex'" is related to having dateutil 2.0 instead of 1.5.
On my system, I have python2-dateutil 1.5-2 from community installed, but not python-dateutil 2.0-3 from community (and not python26-dateutil 1.5-1 from AUR).

Which packages with "dateutil" in the name are installed on your system? Is it only 1.5 that is installed and not 2.0?
Please try reinstalling python2-dateutil (possibly removing it first).

What does this command say?
grep "version" /usr/lib/python2.7/site-packages/dateutil/__init__.py

Comment by Chao WANG (wangchao) - Sunday, 29 January 2012, 10:59 GMT
I only got python2-dateutil installed on my laptop, no python-dateutil.

After a remove/install python2-dateutil, calibre works!
I'm sure I have re-install python2-dateutil via pacman -S, Are there any difference between remove/install and re-install?

Thank you @trontonic!
Comment by Alexander F. Rødseth (xyproto) - Sunday, 29 January 2012, 11:14 GMT
Glad it works now. :)

Yes, some times removing and installing seems to solve problems that reinstall doesn't solve. I've had a problem with ghc in the past that was resolved by removing and installing.

Other than that, it could be harddrive failure, a full harddrive when installing a package or interrupted installs.

Loading...