Fix AttributeError: module 'urllib' has no attribute 'parse'

This commit is contained in:
croneter 2021-07-18 14:46:04 +02:00
parent c9f93b105b
commit 78a3cc434a

View file

@ -9,6 +9,10 @@ from datetime import datetime
from unicodedata import normalize from unicodedata import normalize
from threading import Lock from threading import Lock
import urllib import urllib
# even with the above import urllib, Python3 sometimes runs into this issue
# AttributeError: module 'urllib' has no attribute 'parse'
# Hence import explicitly
import urllib.parse
# Originally tried faster cElementTree, but does NOT work reliably with Kodi # Originally tried faster cElementTree, but does NOT work reliably with Kodi
# etree parse unsafe; make sure we're always receiving unicode # etree parse unsafe; make sure we're always receiving unicode
from . import defused_etree as etree from . import defused_etree as etree