After debugging, I found that the media_root set in the setting added a comma like static, which caused the path to become a tuple, so an error was reported, just delete the comma.
STATIC_URL = ' /static/ ' STATICFILES_DIRS = ( BASE_DIR / ' mytest/dist/static ' , ) MEDIA_URL = ' /media/ ' MEDIA_ROOT = (BASE_DIR / ' mytest/dist/files ' )
Similar Posts:
- ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT set…
- [Solved] PyCharm Start Error: TypeError: unsupported operand type(s) for /: ‘str’ and ‘str’
- “No module named context_processors”
- ERRORS: ?: (corsheaders.E013) Origin ‘*’ in CORS_ORIGIN_WHITELIST is missing scheme or ne…
- C# call Python error no module named OS [How to Solve]
- [Solved] Vue cli 3.0 error: “Failed to load resource: net::ERR_FILE_NOT_FOUND”
- from bs4 import BeautifulSoup Error [How to Solve]
- Vue production webpack package PathError [Solved]
- When using bootstrap modal box, uncaught typeerror: $(…). Modal is not a function
- [Solved] Using jdk11 to deploy Nacos under Linux, the startup error is: could not find or load main class