Error in Chain of Function calls (Code Attached)

bruno at modulix onurb at xiludom.gro
Fri Jun 9 12:26:29 EDT 2006


Girish Sahani wrote:
>>Girish Sahani wrote:
>>
(snip)

>>>Before the
>>>main function, i have defined the other functions such as
>>>genColocations,genTableInstances,etc. Output of genColocations is to be
>>>given to the next function genTableInstances,output of this function to
>>>tiCount and findPI, and so on.
>>>However i am getting an error at the line marked with ***.
>>
>>Which error ? How do you hope us to be of any help here if you don't *at
>>least* provide the full traceback ? FWIW, the canonical way to do things
>>is to:
>>- provide minimal *runnable* code exposing the problem
>>- explain what you hoped to get
>>- explain what you got instead (including full traceback)
>>
>>As a matter of fact, it's often the case that one solves the problem
>>when working on the first point !-)
>>
>>(snip)
> 
> Ohh...I was thinking that posting the whole code would not be a good idea.

It's *not* a good idea - unless the code is *very* short and has no
dependencies on anything else than the stdlib. Please re-read
*carefully* the first point :

- provide minimal *runnable* code exposing the problem

and notice the use of the word "minimal". I *never* suggested that you
post the *whole* code.

> The error i get above is:
> line 266, in colocationMiner
> prunedNew = genColocations(prunedK)

This is *not* the error. It's a line number (which is totally useless if
 you don't have the corresponding file). Please re-read what I wrote
about posting *the full traceback*. Tracebacks are not here to be
beautiful on your screen, there here to give you as much possible
informations about what went wrong.

>  Anyways, i've attached the file colocations.py. 

Don't attach files. Reduce your code to the *minimal* *runnable* code
snippet reproducing the problem.

(snip a few hundred lines of code I won't certainly take time to read
unless I'm being paid for fixing 'em)


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list