Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539152 - sci-misc/mendeleydesktop with python3 - /opt/mendeleydesktop/bin/mendeleydesktop: TypeError: unorderable types: int() < NoneType()
Summary: sci-misc/mendeleydesktop with python3 - /opt/mendeleydesktop/bin/mendeleydesk...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Angelo Arrifano (RETIRED)
URL: http://support.mendeley.com/customer/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-02-06 20:03 UTC by Luís Augusto Perles
Modified: 2015-02-07 11:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mendeley desktop patch (mendeleydesktop.diff,639 bytes, patch)
2015-02-06 20:04 UTC, Luís Augusto Perles
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luís Augusto Perles 2015-02-06 20:03:00 UTC
Mendeley Desktop fails to start issuing the following messages:

Forcing system Qt
Using bundled C++ runtime libraries
Traceback (most recent call last):
  File "/opt/mendeleydesktop/bin/mendeleydesktop", line 244, in <module>
    if version_less_than(ssl_runtime_version, MINIMUM_SSL_VERSION):
  File "/opt/mendeleydesktop/bin/mendeleydesktop", line 111, in version_less_than
    return version_less_than(version_a[period_a+1:],version_b[period_b+1:])
  File "/opt/mendeleydesktop/bin/mendeleydesktop", line 111, in version_less_than
    return version_less_than(version_a[period_a+1:],version_b[period_b+1:])
  File "/opt/mendeleydesktop/bin/mendeleydesktop", line 106, in version_less_than
    elif (version_part_a < version_part_b):
TypeError: unorderable types: int() < NoneType()

The problem is related to Python 3.4 and is described here http://support.mendeley.com/customer/portal/questions/10500786-mendeleydesktop-1-13-1-fails-to-start-with-python3

By patching Mendeley desktop wrapper (/opt/mendeleydesktop/bin/mendeleydesktop) as Erik R. McNellis suggested it worked normally. Here is the patch:
--- mendeleydesktop.orig 2015-01-15 15:49:15.589870680 +0100
+++ mendeleydesktop 2015-01-15 15:46:49.308954069 +0100
@@ -95,11 +95,11 @@
# Both version components are non-numeric, treat
# them as equal
return False
- elif (version_part_a and version_part_b is None):
+ elif (type(version_part_a) is int and version_part_b is None):
# Left version component is numeric, right component is not.
# Treat the numeric part as greater
return False
- elif (version_part_b and version_part_a is None):
+ elif (type(version_part_b) is int and version_part_a is None):
# Right version component is numeric, left component is not.
# Treat the numeric part as greater
return True


Reproducible: Always

Steps to Reproduce:
1. run mendeleydesktop
2.
3.
Actual Results:  
type mendeleydesktop on the terminal and hit enter

Expected Results:  
it fails to start

Run normally.
Comment 1 Luís Augusto Perles 2015-02-06 20:04:45 UTC
Created attachment 395734 [details, diff]
mendeley desktop patch

I could not patch my wrapper using patch command but manually worked perfectly.
Comment 2 Marius Brehler 2015-02-06 21:32:32 UTC
This was already reported and fixed for 1.13.1 (bug #536656).
Somehow, the patch is not appled anymore in the version bumped package. The lines

+
+       # patch for python3
+       epatch "${FILESDIR}/mendeleydesktop-fix-python3.patch"

should be added to the end of src_prepare(). The patch files/mendeleydesktop-fix-python3.patch is still in the tree.
Comment 3 Luís Augusto Perles 2015-02-06 21:46:26 UTC
Thanks Marius, that did the trick.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2015-02-07 11:08:35 UTC
+  07 Feb 2015; Justin Lecher <jlec@gentoo.org> mendeleydesktop-1.13.3.ebuild,
+  metadata.xml:
+  Add missing python dependency and compatibility handling, #539152
+