You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the XML tree is discarded unless mode=XPATH was a keyword argument. If the xpath function is called on a document not in this mode, it fails with AttributeError: 'NoneType' object has no attribute 'xpath', which can be confusing. It's probably easy and good practice to check the mode in that method before trying to make the call that can lead to that error, and raise a more informative exception when appropriate.
The text was updated successfully, but these errors were encountered:
Right now, the XML tree is discarded unless
mode=XPATH
was a keyword argument. If thexpath
function is called on a document not in this mode, it fails withAttributeError: 'NoneType' object has no attribute 'xpath'
, which can be confusing. It's probably easy and good practice to check the mode in that method before trying to make the call that can lead to that error, and raise a more informative exception when appropriate.The text was updated successfully, but these errors were encountered: