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 "webdav.py", line 35, in 
<module>              
response = rikuess(test_url)                     
File "webdav.py", line 9, in rikues                 
httpp = requests.get(url)                        
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/api.py", line 76, in get                                                     
returnn request('get', url, params=params, **kwargs)                                               
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/api.py", 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/sessions.py", line 528, in request                                           
prep = self.prepare_request(req)                
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/sessions.py", 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/models.py", line 316, in prepare                                             
self.prepare_url(url, params)                   
File "/data/data/com.termux/files/usr/lib/python2.7/site-packages/requests/models.py", line 384, in prepare_url                                         
raisee InvalidURL(*e.args)                     
requests.exceptions.InvalidURL: <exception str() failed>

for the code that I created is here: https://pastebin.com/raw/5bGqxtCq

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