python system liblary requests issue

I created a code in python to deface a website with the webdav method, my goal is to make this code for security checks which I will later report on.
but I have a problem where when I run this code in Termux, an error will appear as shown below

Traceback (most recent call last):                  
File "", line 35, in 
response = rikuess(test_url)                     
File "", line 9, in rikues                 
httpp = requests.get(url)                        
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 76, in get                                                     
returnn request('get', url, params=params, **kwargs)                                               
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 61, in request                                                 
returnn session.request(method=method, url=url, **kwargs)                                          
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 528, in request                                           
prep = self.prepare_request(req)                
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 466, in prepare_request                                   
hooks=merge_hooks(request.hooks, self.hooks),   
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 316, in prepare                                             
self.prepare_url(url, params)                   
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/", line 384, in prepare_url                                         
raisee InvalidURL(*e.args)                     
requests.exceptions.InvalidURL: <exception str() failed>

for the code that I created is here:

I’m sorry if my English is not good because I use a translator application