Skip to content
Advertisement

python manage.py collectstatic not working: TypeError: sequence item 0: expected str instance, NoneType found

I have been following this video on Youtube: https://www.youtube.com/watch?v=inQyZ7zFMHM1

My project so far is working fine with static files and all the files load and work properly. So, now I have to deploy the website on Heroku and for that, I uploaded the database on Amazon AWS using this video.

After bucket creation, I did the configurations as mentioned in the video (copied the static files into the Bucket AWS) but it didn’t work for me. It always showed me an error, that failed to load the resources

On searching, I found the command python manage.py collectstatic to upload files into Bucket so I tried it out but this is the error I keep on getting

TypeError: sequence item 0: expected str instance, NoneType found

I have searched a lot on this but unable to figure out what is the issue. This is also the same error which I got when I myself uploaded static files into Bucket and tried to upload a Profile Image

My settings.py file is as follows,

JavaScript

This is my requirements.txt

JavaScript

My File Structure is as follows,

enter image description here

All the static files are working fine if they are on localhost but not working after the connection with AWS. However, the Postgres database is uploaded on AWS and it is working fine (that is, I can create users and etc using the AWS Database and they work fine.)

Advertisement

Answer

You have mispelled AWS_KEY_ACCESS_KEY_ID

It should be AWS_ACCESS_KEY_ID

The program expects a string against AWS_ACCESS_KEY_ID but because it is mispelled, so it is getting None instead. Due to this reason, you are getting an error that NoneType Found

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement