freelawproject / doctor

A microservice for document conversion at scale
https://free.law/projects/doctor
BSD 2-Clause "Simplified" License
54 stars 14 forks source link

fix(tasks.extract_from_html): Catch UnicodeDecodeError #182

Closed grossir closed 7 months ago

grossir commented 7 months ago

UnicodeDecodeError was bubbling because except clause was not catching it

Solves #181

flooie commented 7 months ago

@mlissner - sorry to get in the way of this.

mlissner commented 7 months ago

We passed like ships in the night! My thought was that if we want to remove it — you tell me — I could do it and then we'd know if my magic powers fix the deployment workflow.

flooie commented 7 months ago

I say let it disappear into the ether.

mlissner commented 7 months ago

Hm, there's something interesting (clever?) going on here:

https://github.com/freelawproject/doctor/blob/adf391227995a1360d673f07258e9ce1af5f51e4/doctor/lib/utils.py#L93-L95

Hm...I don't have time to think through if we want to remove that or if it's doing something useful, but happy to do what you say.