Hey all,
I'm getting the following warning:
venv/lib/python3.10/site-packages/bs4/builder/__init__.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument `features="xml"` into the BeautifulSoup constructor.
warnings.warn(
What I'm doing to get this:
- Downloading account data using ofxget as described here
- Importing that data using beancount-reds-importer (e.g. here)
Things I've tried or discovered:
- I looked for all instances of `soup = BeautifulSoup .. ` and found the main calls in ofx.py. I tried changing these calls from feature=lxml to feature=xml which didn't resolve warning
- I made sure lxml is downloaded
- I tried to suppress the warning with a warning.filterwarnings but that didn't work either (not sure it would be the "right" thing either)
- I found a PR in an unrelated repo where they solved by suppressing here
- I tried ofx data downloaded from both Fidelity Investments and Chase (not expecting this to be institution specific)
Questions I have:
- The warning doesn't really help me understand what call into BeautifulSoup caused the warning. Any tips on how to track down where the issue is coming from? Maybe ofx.py isn't part of the issue at all
- I think bean_extract is still working but any suggestions on if the warning should be ignored or resolved would also be appreciated