When i try to run makemigrations command in django it gave me an error

Awais Raza

When i try to run makemigrations command in django it gave me an error:

TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not list

Help me to resolve this issue.

This is my static root and media roots all stuffs:

# settings.py
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = [os.path.join(BASE_DIR, 'static_root')]
MEDIA_ROOT = [os.path.join(BASE_DIR, 'media_root')]
Higor Rossato

STATIC_ROOT and MEDIA_ROOT shouldn't be a list and that's why Django is complaining. You should define them like so:

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')

You can check here and here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Django: Error: Unknown command: 'makemigrations'

Django 1.7 - "No migrations to apply" when run migrate after makemigrations

When I try to run my code with the "java" command in the cmd window, I get an error

ExpectedException in nUnit gave me an error

Node, when I run package.json `bin` `command` , give me `syntax error near unexpected token `(' `

Django: When to run makemigrations?

When i run heroku ps:scale web=1 command i am getting this error. Can anyone help me with this

Getting a ORA-00933: SQL command not properly ended error when I try to run an Oracle stored procedure that I wrote

First project in Django gives me an error when I try to start it

Why my CASE WHEN gave me an AGGREGATION error message?

Pytest gives me an error when try to run a test

Django 2.2.4 - “No migrations to apply” when run migrate after makemigrations

when i tried to make my discord bot it gave me this error

I have got this error when i run python manage.py makemigrations

When I try to run "rails s" or "rails server" command I get an error and It does not let me start the server

When I try to install any package through the command line, I get an error. Can anyone help me on this?

Django makemigrations error

Error on jest when I try to run the test

Python / Django makemigrations Error

SQL or mariadb gives me this error when I try to create a table

I have a problem when I try to run python command in bash

Why is this showing me an error when I try to free a matrix?

django makemigrations error "no such column"

I have an error in django with the command manage.py makemigrations

Lua: I get error when I try to run a script in Windows

i was working on a discord bot and i needed a money system .unfortunately every time i run the code it gave me the key error

How can I solve django.db.utils.OperationalError when I try to migrate data when I run my docker compose up command?

I already installed nodemon to my node express backend but when I run "npm run dev" it gave me this error.?

when i try to run this cmd "npm run compile:sass" is show me this error