Python Forum
'ellipsis' object has no attribute 'lower' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: 'ellipsis' object has no attribute 'lower' (/thread-8946.html)



'ellipsis' object has no attribute 'lower' - Bharath_AK - Mar-14-2018

Hi There,

I am getting the following error when I run python3 manage.py runserver 0.0.0.0:8000


Error:
File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 138, in __call__ response = self.process_request(request) File "/usr/local/lib/python3.6/dist-packages/django/middleware/security.py", line 25, in process_request host = self.redirect_host or request.get_host() File "/usr/local/lib/python3.6/dist-packages/django/http/request.py", line 105, in get_host if domain and validate_host(domain, allowed_hosts): File "/usr/local/lib/python3.6/dist-packages/django/http/request.py", line 579, in validate_host if pattern == '*' or is_same_domain(host, pattern): File "/usr/local/lib/python3.6/dist-packages/django/utils/http.py", line 291, in is_same_domain pattern = pattern.lower() AttributeError: 'ellipsis' object has no attribute 'lower'
I am running this command on ubuntu 16.04 in aws.

Please help me how to fix this error.

With Many thanks,

Bharath AK


RE: 'ellipsis' object has no attribute 'lower' - DeaD_EyE - Mar-14-2018

The object ellipsis is represented by ... three dots.
This object is used somewhere as slice notation for scientific libraries like numpy.

If you put somewhere in you django config three dots without quotes,
it's recognized as a valid object, but it is in this case not a string.

Look for three dots in your config, edit it and then you'll be able to run it.


RE: 'ellipsis' object has no attribute 'lower' - Bharath_AK - Mar-15-2018

Hi There,

Which config file I have change. Error is happening at http.py. Please help me Which file I have to change and where it would be located.

With Many Thanks,
Bharath AK


RE: 'ellipsis' object has no attribute 'lower' - Gribouillis - Mar-15-2018

You can perhaps find the file with the command
Output:
grep -E -e "[.]{3}" -r /your/project/folder



RE: 'ellipsis' object has no attribute 'lower' - Bharath_AK - Mar-15-2018

Hi There,

It is listing out in lots file but not on any config file. Please tell me what can be done.

With Many thanks,
Bharath AK