Python Forum

Full Version: 'ellipsis' object has no attribute 'lower'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
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
You can perhaps find the file with the command
Output:
grep -E -e "[.]{3}" -r /your/project/folder
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