Issue1971

classification
Title: Jython 2.5.3 - platform.py - 'NoneType' object has no attribute 'groups'
Type: crash Severity: normal
Components: Library Versions: 2.5.3b2
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: Thev00d00, amak
Priority: Keywords:

Created on 2012-09-26.09:44:09 by Thev00d00, last changed 2013-02-09.19:32:24 by Thev00d00.

Messages
msg7463 (view) Author: Ian Whyman (Thev00d00) Date: 2012-09-26.09:44:08
When calling python_version. Regression since 2.5.2.

$ jython2.5 
Jython 2.5.3 (, Aug 26 2012, 17:23:45) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_07
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.python_version()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/jython-2.5/Lib/platform.py", line 1153, in python_version
    return _sys_version()[0]
  File "/usr/share/jython-2.5/Lib/platform.py", line 1135, in _sys_version
    version, buildno, builddate, buildtime, compiler = \
AttributeError: 'NoneType' object has no attribute 'groups'
msg7651 (view) Author: Alan Kennedy (amak) Date: 2013-02-09.15:55:48
There were two circumstances under which this bug occurred.

1. Where jython was built on windows
2. Where jython was built without mercurial present

By the look of your shell prompt, you're not running on windows. Did you build your own jython without mercurial present?

I have fixed the issue for both of these circumstances

http://hg.python.org/jython/rev/56e560cd6209
msg7653 (view) Author: Ian Whyman (Thev00d00) Date: 2013-02-09.19:32:24
Actually yes, that sounds right. It was built on Gentoo and the system was unlikely to have had hg on it at the time.

Thanks for the fix :)
History
Date User Action Args
2013-02-09 19:32:24Thev00d00setmessages: + msg7653
2013-02-09 15:55:48amaksetstatus: open -> closed
assignee: amak
resolution: fixed
messages: + msg7651
nosy: + amak
2012-09-26 09:44:10Thev00d00create