Bug 902665 - [abrt] calibre-0.9.8-1.fc18: terminal.py:152:write:TypeError: encode() argument 1 must be string, not None
Summary: [abrt] calibre-0.9.8-1.fc18: terminal.py:152:write:TypeError: encode() argume...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: calibre
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5d5c6e7b4ab2ad357a6a36211d3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-22 08:03 UTC by Bradley
Modified: 2013-02-04 15:12 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-04 15:12:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.49 KB, text/plain)
2013-01-22 08:03 UTC, Bradley
no flags Details
File: core_backtrace (838 bytes, text/plain)
2013-01-22 08:04 UTC, Bradley
no flags Details
File: environ (1.60 KB, text/plain)
2013-01-22 08:04 UTC, Bradley
no flags Details
File: smolt_data (2.94 KB, text/plain)
2013-01-22 08:04 UTC, Bradley
no flags Details

Description Bradley 2013-01-22 08:03:55 UTC
Description of problem:
Get this when I login, after upgrade from F17->F18

Version-Release number of selected component:
calibre-0.9.8-1.fc18

Additional info:
cmdline:        python2 /usr/bin/calibre -session 211b93586-6615-474f-a0c1-80e7e945c72d_1322387283_97283
dso_list:       python-libs-2.7.3-13.fc18.x86_64
executable:     /usr/bin/calibre
kernel:         3.7.2-204.fc18.x86_64
uid:            500

Truncated backtrace:
terminal.py:152:write:TypeError: encode() argument 1 must be string, not None

Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/gui2/main.py", line 401, in main
    app, opts, args, actions = init_qt(args)
  File "/usr/lib64/calibre/calibre/gui2/main.py", line 87, in init_qt
    opts, args = parser.parse_args(args)
  File "/usr/lib64/python2.7/optparse.py", line 1401, in parse_args
    self.error(str(err))
  File "/usr/lib64/calibre/calibre/utils/config.py", line 120, in error
    _OptionParser.error(self, msg)
  File "/usr/lib64/python2.7/optparse.py", line 1582, in error
    self.print_usage(sys.stderr)
  File "/usr/lib64/calibre/calibre/utils/config.py", line 105, in print_usage
    _OptionParser.print_usage(self, file=s)
  File "/usr/lib64/python2.7/optparse.py", line 1602, in print_usage
    print >>file, self.get_usage()
  File "/usr/lib64/calibre/calibre/utils/terminal.py", line 152, in write
    text = text.encode(self.encoding, 'replace')
TypeError: encode() argument 1 must be string, not None

Local variables in innermost frame:
text: u'\x1b[34m\x1b[1mUsage\x1b[0m: \x1b[33m\x1b[1mcalibre\x1b[0m [opts] [path_to_ebook]\n\nLaunch the main calibre Graphical User Interface and optionally add the ebook at\npath_to_ebook to the database.\n\n\nWhenever you pass arguments to calibre that have spaces in them, enclose the arguments in quotation marks.'
self: <calibre.utils.terminal.ANSIStream object at 0x2de0f90>

Comment 1 Bradley 2013-01-22 08:03:59 UTC
Created attachment 684933 [details]
File: backtrace

Comment 2 Bradley 2013-01-22 08:04:01 UTC
Created attachment 684934 [details]
File: core_backtrace

Comment 3 Bradley 2013-01-22 08:04:04 UTC
Created attachment 684935 [details]
File: environ

Comment 4 Bradley 2013-01-22 08:04:08 UTC
Created attachment 684936 [details]
File: smolt_data

Comment 5 Kevin Fenzi 2013-01-22 15:05:54 UTC
Was this a one time crash? Or does it happen everytime you run it?

Comment 6 Bradley 2013-01-23 08:44:07 UTC
Happens when I log in. It doesn't happen when I run it manually.

I don't know why calibre is trying to load on login; on F17 it only loaded when run manually.

.xsession-errors has:

"Usage: calibre [opts] [path_to_ebook]

Launch the main calibre Graphical User Interface and optionally add the ebook at
path_to_ebook to the database.


Whenever you pass arguments to calibre that have spaces in them, enclose the arguments in quotation marks.

calibre: error: no such option: -e"

But I don't know why its trying to run in the first place....

Comment 7 Kevin Fenzi 2013-01-23 22:54:45 UTC
Sounds like your desktop has saved this broken calibre call into it's startup apps. ;( 

What desktop are you using?

Comment 8 Bradley 2013-01-23 23:04:40 UTC
XFCE. ITs not anywhere in ~/.* - will have to poke around on the weekend.

However, its still a calibre bug - its displaying an error message and then a stacktrace. Can't confirm that until I know what args are being passed, though.

Comment 9 Kevin Fenzi 2013-01-23 23:06:22 UTC
Try ~/.cache/sessions/* ?

upstream is pretty uncaring about tracebacks when there is a error... but we could try asking. ;)

Comment 10 Bradley 2013-01-25 08:30:10 UTC
Yeah, that's it:

Client5_RestartCommand=/usr/bin/calibre,-session,211b93586-6615-474f-a0c1-80e7e945c72d_1322387283_97283

Although running that manually produces the log, it doesn't produce the backtrace, and despite a couple of days of it happening when I log in it didn't happen today..

Comment 11 Bradley 2013-02-04 09:41:43 UTC
OK, not running calibre and then resaving the session on logout has 'fixed' this.

So if the error on invalid commands isn't considered a bug, then you can close this.

Comment 12 Kevin Fenzi 2013-02-04 15:12:13 UTC
ok.


Note You need to log in before you can comment on or make changes to this bug.