2016-07-10, 04:26
I'm updating some of the error catching on Artist Slideshow, and I've run into a problem. If AS gets back a malformed XML file from a couple services, it crashes and reports a ParseError from ElementTree. But when I try and catch it I get an error saying that the module doesn't have that.
I load ElementTree like this:
and then try and catch the error with:
For now I'm doing the really nasty except with no condition thing. That's less than ideal, and I'd like to figure out what's causing this.
If you'd like more context, the project is on github at https://github.com/pkscout/script.artistslideshow and one of the files that does this is resources/plugins/htbackdrops.py. Would it matter that the main default.py imports the stuff from the plugin folder?
I load ElementTree like this:
Code:
import xml.etree.ElementTree as _xmltree
and then try and catch the error with:
Code:
except _xmltree.ParseError:
For now I'm doing the really nasty except with no condition thing. That's less than ideal, and I'd like to figure out what's causing this.
If you'd like more context, the project is on github at https://github.com/pkscout/script.artistslideshow and one of the files that does this is resources/plugins/htbackdrops.py. Would it matter that the main default.py imports the stuff from the plugin folder?