You do it wrong. You shouldn't turn your code in quotes. Watch here how it should be

It should be like:

STATICFILES_DIRS = (
    os.path.join(os.path.dirname(__file__), "static")
)

Also it belongs to your MEDIA_ROOT and STATIC_ROOT settings.

Answer from Andrey Nelubin on Stack Overflow
🌐
GitHub
github.com › celery › kombu › issues › 883
AttributeError: 'tuple' object has no attribute 'startswith' · Issue #883 · celery/kombu
May 31, 2018 - I get the following exception when sending a task to a non-default queue (top line of the trace is my own code): File "/Users/misha/pn/dbi2/dbi2/server.py", line 581, in add_input celery.absorb_input_file.apply_async(kwargs=task_kwargs) ...
Published   May 31, 2018
Discussions

[master] AttributeError: 'tuple' object has no attribute 'startswith'
Hey, I wasn't playing with python-for-android for a long time. I just wanted to update my old qt5 recipe as I got together with the PySide2 team a (almost) working version of PySide. I just wan... More on github.com
🌐 github.com
2
February 8, 2016
python - AttributeError: 'tuple' object has no attribute 'startswith' when start migrate - Stack Overflow
I made makemigrations, and next I used migrate. But it conduct to next error: AttributeError: 'tuple' object has no attribute 'startswith' I understand, that it links with confusing string and ma... More on stackoverflow.com
🌐 stackoverflow.com
February 13, 2019
AttributeError: 'tuple' object has no attribute 'startswith' when using Python httplib - Stack Overflow
I'm trying fetch account information by python, which's OAuth 1.0. And I have the code below: token_url = "oauth/token?" + urlencode(ksort(params)) + "&sig=%s",sig conn = httplib.HTTPSConnecti... More on stackoverflow.com
🌐 stackoverflow.com
python - 'tuple' object has no attribute 'startswith' when stripping first and last quote from the string in pandas - Stack Overflow
I am trying to get rid of single quotes around nested dictionaries in pandas data frame (the first element and last element of an object). I am looping through each row in column metadata. Exampl... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Django
code.djangoproject.com › ticket › 32024
#32024 (AttributeError: 'tuple' object has no attribute 'startswith') – Django
manage.py@dev > migrate ssh://root@10.32.109.197:22/proj/env/bin/python3 -u /root/.pycharm_helpers/pycharm/django_manage.py migrate /proj/app/mysite File tracking disabled Operations to perform: Apply all migrations: admin, auth, cmdb, contenttypes, sessions Running migrations: Applying cmdb.0001_initial...Traceback (most recent call last): File "/root/.pycharm_helpers/pycharm/django_manage.py", line 59, in <module> run_command() File "/root/.pycharm_helpers/pycharm/django_manage.py", line 46, in run_command run_module(manage_file, None, '__main__', True) File "/usr/local/python3/lib/python3.8
🌐
Django
code.djangoproject.com › ticket › 2115
#2115 ('tuple' object has no attribute 'startswith') – Django
initial_slashes = path.startswith('/') AttributeError at /admin/cotix/producto/1/ 'tuple' object has no attribute 'startswith' Have a look in your settings.py file and check that the MEDIA_ROOT line does not end with a comma. It looks like you are passing in a one-tuple, rather than a string, ...
🌐
Google Groups
groups.google.com › g › cherrypy-users › c › jjhVQCnXC24
HelloWorld sanity check please - AttributeError: 'tuple' object has no attribute 'startswith'
You really can't see it? That the second line in the [/html] section has a trailing comma? In Python, that turns it from a string constant to a one-item tuple.
🌐
Django
code.djangoproject.com › ticket › 32026
#32026 (AttributeError: 'tuple' object has no attribute 'startswith') – Django
if name.startswith("") and name.endswith(""): AttributeError: 'tuple' object has no attribute 'startswith' The following error will be reported as soon as the new environment is submitted (migrate). Please solve it, thank you very much! Duplicate of #32024. Note: See TracTickets for help on using tickets.
🌐
Django
code.djangoproject.com › ticket › 32025
#32025 (AttributeError: 'tuple' object has no attribute 'startswith') – Django
AttributeError: 'tuple' object has no attribute 'startswith' / The following error will be reported as soon as the new environment is submitted (migrate).
Find elsewhere
🌐
GitHub
github.com › kivy › python-for-android › issues › 631
[master] AttributeError: 'tuple' object has no attribute 'startswith' · Issue #631 · kivy/python-for-android
February 8, 2016 - [master] AttributeError: 'tuple' object has no attribute 'startswith'#631 · #641 · Copy link · thopiekar · opened · on Feb 8, 2016 · Issue body actions · Hey, I wasn't playing with python-for-android for a long time. I just wanted to update my old qt5 recipe as I got together with the PySide2 team a (almost) working version of PySide.
Author   thopiekar
🌐
GitHub
github.com › django-commons › django-debug-toolbar › issues › 449
HeaderDebugPanel exception, 'tuple' object has no attribute 'startswith' · Issue #449 · django-commons/django-debug-toolbar
HeaderDebugPanel exception, 'tuple' object has no attribute 'startswith'#449 · Copy link · ebrelsford · opened · on Nov 9, 2013 · After upgrading to Django==1.6, using django-debug-toolbar==0.11.0, I get the following exception: AttributeError: 'tuple' object has no attribute 'startswith' This happens in debug_toolbar/panels/headers.py in process_request, line 50: (unmangle(k), v) for (k, v) in wsgi_env if k.startswith('HTTP_')) Disabling HeaderDebugPanel, everything else works fine with django-debug-toolbar.
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-81950 › Flaky-error-in-Debugger-AttributeError-tuple-object-has-no-attribute-startswith
'tuple' object has no attribute 'startswith' : PY-81950
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
Reddit
reddit.com › r › codehunter › comments › u728jr › attributeerror_tuple_object_has_no_attribute
r/codehunter - AttributeError: 'tuple' object has no attribute 'startswith'
April 19, 2022 - File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 61, in isabs return s.startswith('/')AttributeError: 'tuple' object has no attribute 'startswith'
🌐
LearnDataSci
learndatasci.com › solutions › python-attributeerror-tuple-object-has-no-attribute
Python AttributeError: 'tuple' object has no attribute – LearnDataSci
The error AttributeError: 'tuple' object has no attribute is caused when treating the values within a tuple as named attributes.
🌐
Tutorial Reference
tutorialreference.com › python › examples › faq › python-error-attributeerror-tuple-object-has-no-attribute-x
How to Resolve Python "AttributeError: 'tuple' object has no attribute '...'" | Tutorial Reference
The AttributeError: 'tuple' object has no attribute '...' is a common Python error encountered when you try to call a method (like append or split) or access an attribute on a variable that holds a tuple, but that method/attribute doesn't actually exist for tuple objects.
🌐
Python.org
discuss.python.org › python help
AttributeError: 'tuple' object has no attribute 'enter' - Python Help - Discussions on Python.org
March 5, 2025 - Help! I’m coding a game program for my daughter and I come up with the following error: Traceback (most recent call last): File “/home/roberto-padilla/mystuff/ella_game.py”, line 193, in a_game.play() File “/home/roberto-padilla/mystuff/ella_game.py”, line 22, in play next_scene_name = current_scene.enter() ^^^^^^^^^^^^^^^^^^^ AttributeError: ‘tuple’ object has no attribute ‘enter’ Here’s the code: class Engine(object): def __init__(self, scene_map): self.scene_map = scen...
🌐
Researchdatapod
researchdatapod.com › home › how to solve python attributeerror: ‘list’ object has no attribute ‘startswith’
How to Solve Python AttributeError: 'list' object has no attribute 'startswith' - The Research Scientist Pod
June 24, 2022 - AttributeError occurs in a Python program when we try to access an attribute (method or property) that does not exist for a particular object. The part “‘list’ object has no attribute ‘startswith’” tells us that the list object does ...