import urlparse and fallback to urllib.parse
catch exception while creating Adapter object