0

I was debugging using ipdb and use step command to step into a function in a another file. And then list command not work anymore. Below is output from debuggin. Am I doing anything wrong?

> parse.py(36)<module>()
     35 import ipdb; ipdb.set_trace()
---> 36 model.fit(observations, obsrv_lengths)
     37 f.close()

ipdb> list
     31 
     32 observations = np.concatenate(observations)
     33 
     34 model = hmm.MultinomialHMM(n_components=20, n_iter=50)
     35 import ipdb; ipdb.set_trace()
---> 36 model.fit(observations, obsrv_lengths)
     37 f.close()
     38 
     39 f2 = open('training.log')
     40 for line in f2:
     41     sql = line.split('\n')[0].split('Query')

ipdb> s
--Call--
> hmmlearn/base.py(398)fit()

ipdb> list

ipdb> 

1 Answers1

0

I wrote at great length about this here.

The basic idea is that there might not be a source file to show, and ipdb and pdb are pretty weak when that happens. You can use bt to get some idea of why this might be happening, and use trepan to sometimes overcome it.

Community
  • 1
  • 1
rocky
  • 7,226
  • 3
  • 33
  • 74