Wikipedia
Wikipedia copied to clipboard
During Disambiguation exception catch, exception missing title and options.
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.
just write
except wikipedia.DisambiguationError as e:
The way you write it, it calls the function instead of referencing the error code I believe.