线程django-main-thread中的异常

时间:2019-05-23 11:22:37

标签: python django

我正在使用oauth2client库实现google登录,并在 <button type="checkbox" onclick="yesnoCheck();" id="yesCheck" value="Show required fields">Show required fields</button> <br> <div id="ifYes"> <input type="text" value="" /> One <input type="text" value="" />Two <input type="text" value="" />Three <input type="text" value="" required/>Four </div>中做了一些更改 刚刚将/google-login/myvenv/lib/python3.5/site-packages/oauth2client/contrib/django_util/__init__.py替换为from django.core import urlresolvers,将第411行from django.urls import reverse替换为urlresolvers.reverse(...) 在运行服务器时 python manage.py运行服务器 发生typeError 追溯此错误的原因是:

reverse(...)

获得此回溯 我不知道这是什么意思。

Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/akshay/django/google_login/myvenv/lib/python3.6/site-packages/django/utils/autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "/home/akshay/django/google_login/myvenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "/home/akshay/django/google_login/myvenv/lib/python3.6/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
    raise _exception[0](_exception[1]).with_traceback(_exception[2])
TypeError: __init__() missing 2 required positional arguments: 'doc' and 'pos'

1 个答案:

答案 0 :(得分:0)

我的client_secrets.json文件中存在语法错误。 修复后,它起作用了。 感谢AKX指出。