找不到连接适配器的URL请求,Python中出现错误

找不到连接适配器的URL请求,Python中出现错误,url,request,Url,Request,嗨,我不知道如何摆脱这一切。我已经尝试使用.strip(“,()”)剥离这段代码,并从tuple对象中生成一个字符串,但它仍然运行相同的错误 indir = '/home/d/Desktop/civiv_hacking/Streetnames/dump/berlin.kauperts.de/Strassen' for root, dirs, filenames in os.walk(indir): for f in filenames: x = urlparse.urljoin("ht

嗨,我不知道如何摆脱这一切。我已经尝试使用.strip(“,()”)剥离这段代码,并从tuple对象中生成一个字符串,但它仍然运行相同的错误

indir = '/home/d/Desktop/civiv_hacking/Streetnames/dump/berlin.kauperts.de/Strassen'
for root, dirs, filenames in os.walk(indir):
  for f in filenames:
   x = urlparse.urljoin("https://berlin.kauperts.de/Strassen/", f+".html"),
     print(f),
     print(x),
       for r in requests.get(x):'
打印(x)给出
('https://berlin.kauperts.de/Strassen/Igelsteig-12557-Berlin.html”,)
但是如果我这样做:
x1=(str(x).strip(“(),”),
它给出
https://berlin.kauperts.de/Strassen/Igelsteig-12557-Berlin.html

但我还是经常犯同样的错误:

in get_adapter raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for '('https://berlin.kauperts.de/Strassen/Igelsteig-12557-Berlin.html',)'
有人知道一条出路吗? 非常感谢

当然,
x1=(str(x).translate(None,“(),”)
也没有任何好处。