Merge pull request #1541 from croneter/py3-fix-attributeerror
Fix AttributeError: module 'urllib' has no attribute 'parse'
This commit is contained in:
commit
1711beaf95
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue