问题描述
环境:
请求方法:GET 请求网址:http://127.0.0.1:8000/admin/
Request Method: GET Request URL: http://127.0.0.1:8000/admin/
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.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
Django Version: 1.10.6 Python Version: 3.6.0 Installed Applications: ['music.apps.MusicConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
追溯:
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersexception.py" 在内部 42. response = get_response(request)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersexception.py" in inner 42. response = get_response(request)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _legacy_get_response 249. response = self._get_response(request)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _legacy_get_response 249. response = self._get_response(request)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _get_response 187. response = self.process_exception_by_middleware(e, request)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _get_response 187. response = self.process_exception_by_middleware(e, request)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _get_response 185. response = Wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocorehandlersase.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" 在包装器 229 中.返回 self.admin_view(view, cacheable)(*args, **kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in wrapper 229. return self.admin_view(view, cacheable)(*args, **kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoutilsdecorators.py" in _wrapped_view 149. response = view_func(request, *args, **kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoutilsdecorators.py" in _wrapped_view 149. response = view_func(request, *args, **kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoviewsdecoratorscache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoviewsdecoratorscache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" 在内部 211. return view(request, *args, **kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in inner 211. return view(request, *args, **kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoviewsdecoratorscache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangoviewsdecoratorscache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py"在索引 468 中.app_list = self.get_app_list(request)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in index 468. app_list = self.get_app_list(request)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" 在 get_app_list 451. app_dict = self._build_app_dict(request)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in get_app_list 451. app_dict = self._build_app_dict(request)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in _build_app_dict 418.model_dict['admin_url'] = reverse('admin:%s_%s_changelist' % info, current_app=self.name)
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangocontribadminsites.py" in _build_app_dict 418. model_dict['admin_url'] = reverse('admin:%s_%s_changelist' % info, current_app=self.name)
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsase.py" 反向 60. app_list = resolver.app_dict[ns]
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsase.py" in reverse 60. app_list = resolver.app_dict[ns]
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" 在 app_dict 256 中.self._populate()
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in app_dict 256. self._populate()
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in _populate 209. for name in pattern.reverse_dict:
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in _populate 209. for name in pattern.reverse_dict:
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" 在 reverse_dict 242 中.self._populate()
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in reverse_dict 242. self._populate()
文件C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in _populate 196. 反转模式(self.url_patterns):
File "C:UsersDell LaptopAppDataLocalProgramsPythonPython36-32libsite-packagesdjango-1.10.6-py3.6.eggdjangourlsesolvers.py" in _populate 196. for pattern in reversed(self.url_patterns):
异常类型:/admin/处的 TypeError 异常值:set"对象不可逆
Exception Type: TypeError at /admin/ Exception Value: 'set' object is not reversible
推荐答案
在您的网址中将 {} 括号更改为 [] 这些
in your urls change {} brackets to [] these
这篇关于/admin/'set' 对象的 TypeError 不可逆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!