Django admin 在/admin/'处输入错误;设置';对象是不可逆的

Django admin 在/admin/'处输入错误;设置';对象是不可逆的,django-admin,typeerror,Django Admin,Typeerror,环境: 请求方法:获取请求URL: Django版本:1.10.6 Python版本:3.6.0安装的应用程序:[“music.apps.MusicConfig”,“Django.contrib.admin”,“Django.contrib.auth”,“Django.contrib.contenttypes”,“Django.contrib.sessions”,“Django.contrib.messages”,“Django.contrib.staticfiles”]安装的中间件:['dja

环境:

请求方法:获取请求URL:

Django版本:1.10.6 Python版本:3.6.0安装的应用程序:[“music.apps.MusicConfig”,“Django.contrib.admin”,“Django.contrib.auth”,“Django.contrib.contenttypes”,“Django.contrib.sessions”,“Django.contrib.messages”,“Django.contrib.staticfiles”]安装的中间件:['django.middleware.security.SecurityMiddleware','django.contrib.sessions.middleware.SessionMiddleware','django.middleware.common.CommonMiddleware','django.middleware.csrf.CsrfViewMiddleware','django.contrib.messages.MessageMiddleware','django.middleware.clickjacking.XFrame选项“]

回溯:

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\core\handlers\exception.py”,位于内部42.response=get\u response(请求)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\core\handlers\base.py”位于\u legacy\u get\u response 249.response=self.\u get\u response(请求)中

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\core\handlers\base.py”位于\u get\u response 187.response=self.process\u异常\u由\u中间件(e,请求)生成

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\core\handlers\base.py”位于\u get\u response 185.response=wrapped\u回调(请求,*callback\u args,**callback\u kwargs)

包装229中的文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python 36-32\lib\site packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites.py”。返回self.admin_视图(视图,可缓存)(*args,**kwargs)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\utils\decorators.py”位于包装视图149中。响应=视图函数(请求,*args,**kwargs)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\views\decorators\cache.py”位于包装视图函数57中。响应=视图函数(请求,*args,**kwargs)

内部211中的文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python 36-32\lib\site packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites.py”。返回视图(请求,*args,**kwargs)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\views\decorators\cache.py”位于包装视图函数57中。响应=视图函数(请求,*args,**kwargs)

索引468中的文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python 36-32\lib\site packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites.py”。app_list=self.get_app_list(请求)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites.py”位于get\u app\u list 451.app\u dict=self.\u build\u app\u dict(请求)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\contrib\admin\sites.py”位于\u build\u app\u dict 418.model\u dict['admin\u url']=reverse('admin:%s\s\s变更列表'%info,当前\u app=self.name)

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\url\base.py”,反向60。app\u list=resolver.app\u dict[ns]

app_dict 256.self.\u populate()中的文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python 36-32\lib\site packages\django-1.10.6-py3.6.egg\django\url\resolvers.py”

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\url\resolvers.py”位于填充209中。对于pattern.reverse目录中的名称:

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\url\resolvers.py”,格式相反\u dict 242.self.\u populate()

文件“C:\Users\Dell Laptop\AppData\Local\Programs\Python\Python36-32\lib\site packages\django-1.10.6-py3.6.egg\django\url\resolvers.py”位于(u populate 196)中。对于反转模式(self.url)中的模式:


异常类型:TypeError位于/admin/Exception Value:'set'对象不可逆

在URL中将{}括号更改为[]这些

请在URL.py文件中将{}更改为[]。
e、 g.urlpatterns=[path(“”,views.itemlist,name=“itemlist”),]

您必须将urls.py中的{}更改为[],其中urlpatterns变量可能是