2

I'm running into an error in mechanize for python in which valid links that I try to open with it gives me the following error:

urlopen error [Errno 8] nodename nor servname provided, or not known

And it's not a problem of mechanize not being able to open them because when I open them in interactive Python using mechanize, there is no error. So I'm suspecting that there is something wrong with too many mechanize browsers being open.

How would I close a mechanize browser?

Is there a command like br.close()?

TIA

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Edasaur
  • 397
  • 1
  • 8
  • 19

1 Answers1

5

As you said, there is a close() method on a Browser instance:

br.close()
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195