Wikipedia icon indicating copy to clipboard operation
Wikipedia copied to clipboard

During Disambiguation exception catch, exception missing title and options.

Open JAcamp1 opened this issue 4 years ago • 1 comments

When doing a basic exception catch test with disambiguation page New York as an input the line except wikipedia.exceptions.DisambiguationError as e is returned with a type error stating a missing 2 positional arguments TypeError: __init__() missing 2 required positional arguments: "title" and "may_refer_to" I am utterly confused by this as I have looked both at the exceptions script in this package and at my own code. I cannot surmise which side is functioning improperly.

JAcamp1 avatar Oct 02 '20 13:10 JAcamp1

just write except wikipedia.DisambiguationError as e:

The way you write it, it calls the function instead of referencing the error code I believe.

LaZoRBear avatar Jun 10 '21 13:06 LaZoRBear