[Reportbug-maint] Bug#594177: Reopen: Bug#594177: reportbug crashes (with certain proxy environmental variables)

A. Costa agcosta at gis.net
Fri Jan 7 07:08:01 UTC 2011


reopen   594177 !  

thanks

A week back E. de Castro Lopo speculated that the errors for bug
#594177 seemed related to BTS availability.  Maintainer Tosi was unable
to reproduce the bug, and promptly closed it.

Comments, speculation, and a probable cause (might be reproducible, see
end) follow...

I see the error, yet can access the BTS via 'querybts' which
implies that my system's local BTS availability is not the cause.
While online right now (Fri Jan  7 00:48:12 EST 2011) the terminal
shows:

	% reportbug replaceit
	*** Welcome to reportbug.  Use ? for help at prompts. ***
	Detected character set: us-ascii
	Please change your locale if this is incorrect.
	
	Using 'A Costa <agcosta at gis.net>' as your from address.
	Getting status for replaceit...
	Verifying package integrity...
	Checking for newer versions at packages.debian.org...
	Will send report to Debian (per lsb_release).
	Querying Debian BTS for reports on replaceit (source)...
	Traceback (most recent call last):
	  File "/usr/bin/reportbug", line 2098, in <module>
	    main()
	  File "/usr/bin/reportbug", line 1045, in main
	    return iface.user_interface()
	  File "/usr/bin/reportbug", line 1629, in user_interface
	    version=pkgversion)
	  File "/usr/lib/pymodules/python2.6/reportbug/ui/text_ui.py", line 549, in handle_bts_query
	    for entry in hierarchy:
	TypeError: 'NoneType' object is not iterable

Assuming the problem is BTS unavailability, then these error messages
are misleading.  The error message should help the user understand the
problem, e.g.:

	reportbug: error, BTS not available, {insert network error here}.  Quitting...

As an experiment, from the shell I unset my 'ftp_proxy=' and
'http_proxy=' environmental variables.  After which 'reportbug' worked
as expected.  IIRC 'reportbug' wasn't formerly sensitive to
proxy environmental variables.  (My system's haven't changed in years.)

Experiment #2:

	# try it with nonsense proxy settings
	% export ftp_proxy=noproxy ; export http_proxy=noproxy  
	% reportbug dash
	*** Welcome to reportbug.  Use ? for help at prompts. ***
	Detected character set: us-ascii
	Please change your locale if this is incorrect.
	
	Using 'A Costa <agcosta at gis.net>' as your from address.
	Getting status for dash...
	Verifying package integrity...
	Checking for newer versions at packages.debian.org...
	Will send report to Debian (per lsb_release).
	Querying Debian BTS for reports on dash (source)...
	Unable to connect to Debian BTS; continue [y|N|?]? N

That error message was much more informative.  

My initial proxy environmental variables were:

	ftp_proxy=http://localhost:8080/
	http_proxy=http://localhost:8080/

When I reset them to the above, the error recurs.

Therefore 'reportbug' uses proxies.  When the proxy names don't exist
it prints an informative error message.  When the proxies do exist but
somehow foul up a request, 'reportbug' crashes with an obscure error.

It'd be better if 'reportbug' quit with an error pointing out some
problem with the proxy server.

HTH...








More information about the Reportbug-maint mailing list