I got this error recently in my urls.py.
We should naturally be looking for a string in our urls.py (error says str object) and I found that my comment “”” “””” was being the issue.
I’m used to placing a lone string at the beginning of a class or function, but in this case it was in the middle of defining the urlpatterns, so the url parser actually tried to read my string comment.
Just a heads up.
This just saved me a bunch of time. I had commented out some lines in my urlpatterns and I never would’ve thought that was the problem if I hadn’t found this page. I removed the commented lines and it worked. Thanks!
Hey Mark, glad it helped! Thanks for sharing : )
I did this a moment ago ago too..