non descriptive error

Terry Hancock hancock at anansispaceworks.com
Mon Oct 10 22:56:33 CEST 2005


On Sunday 09 October 2005 06:12 pm, Timothy Smith wrote:
> Terry Hancock wrote:
> >By looking at the source code for DutyShift.py?
> >
> well DUH thank you captain obvious! 

Well, since you apparently missed the subtlety, you 
DID NOT GIVE ADEQUATE INFORMATION if you expected to
get some kind of answer.  If you can't post the whole
module, AT LEAST try to reproduce the problem.

If a program doesn't show you where the error occurs,
you can usually find out by "instrumenting" the code,
which means, put in "print" statements.  You should be
able to localize the problem, THEN, it would be
appropriate to post a question about it here, with
a listing of the code showing where the error occurs.

The only way I'd have imagined this happening is if you
have something like

try:
	1 = 2
except:
	print "error"

in your code.  Which might still be the case, given the
way you claim to have "fixed" the problem (since the
kind of error a bad indent would've given you should
look different, unless it was caught, as above).

Now, it's not inconceivable that some unforseen thing
makes Python itself do this, but it's MUCH more likely
that it's something in YOUR CODE that does it.  So you
have the responsibility to localize it, and at least
show us what is being executed when this "error" occurs.

Certainly, if there WERE such a bug, no one would be
able to find it without you doing that.


--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list