ScopeLift / gitcoin-web

🤖Grow Open Source
https://gitcoin.co
Other
1 stars 0 forks source link

sms reverification doesnt work, offset-aware datetimes #75

Closed owocki closed 4 years ago

owocki commented 4 years ago

TypeError at /sms/request can't compare offset-naive and offset-aware datetimes

Request Method: POST Request URL: http://localhost:8000/sms/request Django Version: 2.2.4 Python Executable: /usr/bin/python3 Python Version: 3.6.9 Python Path: ['/code/app', '/code/app', '/usr/bin/python3', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages'] Server time: Fri, 12 Jun 2020 18:37:22 +0000 Installed Applications: ['corsheaders', 'django.contrib.admin', 'taskapp.celery.CeleryConfig', 'django_celery_beat', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'collectfast', 'django.contrib.staticfiles', 'cacheops', 'storages', 'social_django', 'cookielaw', 'django.contrib.humanize', 'django.contrib.sitemaps', 'django.contrib.sites', 'autotranslate', 'django_extensions', 'easy_thumbnails', 'health_check', 'health_check.db', 'health_check.cache', 'health_check.storage', 'health_check.contrib.psutil', 'health_check.contrib.s3boto3_storage', 'app', 'avatar', 'retail', 'rest_framework', 'marketing', 'economy', 'dashboard', 'chat', 'quests', 'enssubdomain', 'faucet', 'tdi', 'gas', 'git', 'healthcheck.apps.HealthcheckConfig', 'legacy', 'chartit', 'email_obfuscator', 'linkshortener', 'credits', 'gitcoinbot', 'dataviz', 'impersonate', 'grants', 'kudos', 'django.contrib.postgres', 'bounty_requests', 'perftools', 'revenue', 'inbox', 'feeswapper', 'search', 'oauth2_provider', 'townsquare', 'compliance', 'django_nyt.apps.DjangoNytConfig', 'mptt', 'sekizai', 'sorl.thumbnail', 'wiki.apps.WikiConfig', 'wiki.plugins.attachments.apps.AttachmentsConfig', 'wiki.plugins.notifications.apps.NotificationsConfig', 'wiki.plugins.images.apps.ImagesConfig', 'wiki.plugins.macros.apps.MacrosConfig', 'adminsortable2', 'debug_toolbar'] Installed Middleware: ['corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'app.middleware.drop_accept_langauge', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'oauth2_provider.middleware.OAuth2TokenMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'ratelimit.middleware.RatelimitMiddleware', 'social_django.middleware.SocialAuthExceptionMiddleware', 'impersonate.middleware.ImpersonateMiddleware']

Traceback:

File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view

  1. return view_func(request, *args, **kwargs)

File "/code/app/dashboard/views.py" in send_verification

  1. if cooldown > datetime.now():

Exception Type: TypeError at /sms/request Exception Value: can't compare offset-naive and offset-aware datetimes Request information: USER: gitcoinbot

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.