After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 496278 - Error in option.parse_args()
Error in option.parse_args()
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-12 21:53 UTC by Vincent Untz
Modified: 2007-11-12 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Untz 2007-11-12 21:53:09 UTC
Traceback (most recent call last):
  • File "./gnome-about", line 997 in ?
    parser.parse_args ()
  • File "/gnome/usr/lib/python2.4/site-packages/gtk-2.0/gobject/option.py", line 339 in parse_args
    args = args[2:-len(old_args)]
TypeError: len() of unsized object

If you call parse_args() with no argument, args is None, and at the end of the function, there's this:
  args = args[2:-len(old_args)]
where old_args is None (because args was None). This is the source of the error.
Comment 1 Johan (not receiving bugmail) Dahlin 2007-11-12 22:00:43 UTC
2007-11-12  Johan Dahlin  <johan@gnome.org>

	* gobject/option.py (OptionParser.parse_args): 
	Set the default value of old_args to 0, so we don't end
	up slicing with None. Fixes #496278 (Vincent Untz)