· 5 years ago · Jan 20, 2020, 10:50 AM
1SUCCESS: TypeError at /groups/28/candidates/
2__init__() got an unexpected keyword argument 'source_type'
3
4Request Method: GET
5Request URL: http://95.213.252.8/groups/28/candidates/?end=2020-01-19T23%3A59%3A59%2B0300&start=2020-01-13T00%3A00%3A00%2B0300
6Django Version: 2.2.9
7Python Executable: /root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/bin/python
8Python Version: 3.7.3
9Python Path: ['/app', '/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/bin', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages', '/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/src/clickhouse-driver', '/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/src/pysendpulse', '/app']
10Server time: Mon, 20 Jan 2020 10:36:59 +0000
11Installed Applications:
12['django.contrib.auth',
13 'django.contrib.contenttypes',
14 'django.contrib.sessions',
15 'django.contrib.messages',
16 'django.contrib.staticfiles',
17 'django.contrib.admin',
18 'drf_yasg',
19 'rest_framework.authtoken',
20 'corsheaders',
21 'colorful',
22 'push_notifications',
23 'django_celery_beat',
24 'authorization',
25 'mentions',
26 'administration',
27 'app']
28Installed Middleware:
29['django.middleware.security.SecurityMiddleware',
30 'django.contrib.sessions.middleware.SessionMiddleware',
31 'corsheaders.middleware.CorsMiddleware',
32 'django.middleware.common.CommonMiddleware',
33 'django.middleware.csrf.CsrfViewMiddleware',
34 'django.contrib.auth.middleware.AuthenticationMiddleware',
35 'django.contrib.messages.middleware.MessageMiddleware',
36 'django.middleware.clickjacking.XFrameOptionsMiddleware']
37
38
39Traceback:
40
41File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
42 34. response = get_response(request)
43
44File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
45 115. response = self.process_exception_by_middleware(e, request)
46
47File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
48 113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
49
50File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
51 54. return view_func(*args, **kwargs)
52
53File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/views/generic/base.py" in view
54 71. return self.dispatch(request, *args, **kwargs)
55
56File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
57 505. response = self.handle_exception(exc)
58
59File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
60 465. self.raise_uncaught_exception(exc)
61
62File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/rest_framework/views.py" in raise_uncaught_exception
63 476. raise exc
64
65File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
66 502. response = handler(request, *args, **kwargs)
67
68File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
69 45. return bound_method(*args, **kwargs)
70
71File "/root/.cache/pypoetry/virtualenvs/rephouse-backend-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
72 44. response = view_func(request, *args, **kwargs)
73
74File "/app/mentions/views/__init__.py" in get
75 296. } for candidate in self.get_queryset()], status=200)
76
77File "/app/mentions/views/__init__.py" in get_queryset
78 274. project_id=self.get_user_project_id(),
79
80File "/app/rephouse_backend/clickhouse/aggregations/queries/mentions.py" in __init__
81 14. super().__init__(**kwargs)
82
83Exception Type: TypeError at /groups/28/candidates/
84Exception Value: __init__() got an unexpected keyword argument 'source_type'
85Request information:
86USER: 79170951655
87
88GET:
89end = '2020-01-19T23:59:59+0300'
90start = '2020-01-13T00:00:00+0300'
91
92POST: No POST data
93
94FILES: No FILES data
95
96COOKIES: No cookie data
97
98META:
99HTTP_ACCEPT = '*/*'
100HTTP_ACCEPT_ENCODING = 'gzip;q=1.0, compress;q=0.5'
101HTTP_ACCEPT_LANGUAGE = 'ru;q=1.0'
102HTTP_AUTHORIZATION = 'Token 133a5403f8d5551de484c029e6dee90bccbbb6a3'
103HTTP_CONNECTION = 'close'
104HTTP_HOST = '95.213.252.8'
105HTTP_USER_AGENT = 'Reputation house/3.3 (forafontov.Reputation-house; build:2; iOS 13.3.0) Alamofire/4.8.2'
106HTTP_X_FORWARDED_FOR = '83.220.227.186'
107PATH_INFO = '/groups/28/candidates/'
108QUERY_STRING = 'end=2020-01-19T23%3A59%3A59%2B0300&start=2020-01-13T00%3A00%3A00%2B0300'
109RAW_URI = '/groups/28/candidates/?end=2020-01-19T23%3A59%3A59%2B0300&start=2020-01-13T00%3A00%3A00%2B0300'
110REMOTE_ADDR = '172.22.0.7'
111REMOTE_PORT = '42860'
112REQUEST_METHOD = 'GET'
113SCRIPT_NAME = ''
114SERVER_NAME = '0.0.0.0'
115SERVER_PORT = '8000'
116SERVER_PROTOCOL = 'HTTP/1.0'
117SERVER_SOFTWARE = 'gunicorn/19.10.0'
118gunicorn.socket = <gevent._socket3.socket object, fd=11, family=2, type=1, proto=6>
119wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f3e16c1d630>
120wsgi.file_wrapper = ''
121wsgi.input = <gunicorn.http.body.Body object at 0x7f3e1690f358>
122wsgi.input_terminated = True
123wsgi.multiprocess = True
124wsgi.multithread = True
125wsgi.run_once = False
126wsgi.url_scheme = 'http'
127wsgi.version = '(1, 0)'
128
129Settings:
130Using settings module rephouse_backend.settings
131ABSOLUTE_URL_OVERRIDES = {}
132ADMINS = []
133ADMIN_PASSWORD = '********************'
134ADMIN_USERNAME = 'mainAdmin2019'
135ALLOWED_HOSTS = ['95.213.252.8', '95.213.195.171', '95.213.252.8', 'localhost']
136APPEND_SLASH = True
137AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
138AUTH_PASSWORD_VALIDATORS = '********************'
139AUTH_USER_MODEL = 'auth.User'
140BASE_DIR = '/app'
141CACHES = {'default': {'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': '/tmp/django_cache'}}
142CACHE_MIDDLEWARE_ALIAS = 'default'
143CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
144CACHE_MIDDLEWARE_SECONDS = 600
145CELERYBEAT_SCHEDULER = 'django_celery_beat.schedulers.DatabaseScheduler'
146CELERY_BROKER_URL = 'amqp://guest:guest@rabbitmq:5672//'
147CELERY_IMPORTS = "('administration.tasks',)"
148CLICKHOUSE_HOST = 'clickhouse'
149CORS_ALLOW_HEADERS = ['accept', 'accept-encoding', 'authorization', 'content-type', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', 'content-disposition']
150CORS_ORIGIN_WHITELIST = ['http://95.213.252.8:8080', 'http://95.213.195.171:8080']
151CSRF_COOKIE_AGE = 31449600
152CSRF_COOKIE_DOMAIN = None
153CSRF_COOKIE_HTTPONLY = False
154CSRF_COOKIE_NAME = 'csrftoken'
155CSRF_COOKIE_PATH = '/'
156CSRF_COOKIE_SAMESITE = 'Lax'
157CSRF_COOKIE_SECURE = False
158CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
159CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
160CSRF_TRUSTED_ORIGINS = []
161CSRF_USE_SESSIONS = False
162DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'rephouse', 'USER': 'rephouse', 'PASSWORD': '********************', 'HOST': 'postgres', 'PORT': 5432, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
163DATABASE_ROUTERS = []
164DATA_UPLOAD_MAX_MEMORY_SIZE = None
165DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
166DATETIME_FORMAT = 'N j, Y, P'
167DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
168DATE_FORMAT = 'N j, Y'
169DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
170DEBUG = True
171DEBUG_PROPAGATE_EXCEPTIONS = False
172DECIMAL_SEPARATOR = '.'
173DEFAULT_CHARSET = 'utf-8'
174DEFAULT_CONTENT_TYPE = 'text/html'
175DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
176DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
177DEFAULT_FROM_EMAIL = 'webmaster@localhost'
178DEFAULT_INDEX_TABLESPACE = ''
179DEFAULT_TABLESPACE = ''
180DEPLOY_TOKEN = '********************'
181DISALLOWED_USER_AGENTS = []
182EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
183EMAIL_HOST = 'smtp.yandex.ru'
184EMAIL_HOST_PASSWORD = '********************'
185EMAIL_HOST_USER = 'reputation.house'
186EMAIL_PORT = '465'
187EMAIL_SSL_CERTFILE = None
188EMAIL_SSL_KEYFILE = '********************'
189EMAIL_SUBJECT_PREFIX = '[Django] '
190EMAIL_TIMEOUT = None
191EMAIL_USE_LOCALTIME = False
192EMAIL_USE_SSL = True
193EMAIL_USE_TLS = False
194FILE_CHARSET = 'utf-8'
195FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
196FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
197FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
198FILE_UPLOAD_PERMISSIONS = None
199FILE_UPLOAD_TEMP_DIR = None
200FIRST_DAY_OF_WEEK = 0
201FIXTURE_DIRS = []
202FORCE_SCRIPT_NAME = None
203FORMAT_MODULE_PATH = None
204FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
205IGNORABLE_404_URLS = []
206INSTALLED_APPS = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'drf_yasg', 'rest_framework.authtoken', 'corsheaders', 'colorful', 'push_notifications', 'django_celery_beat', 'authorization', 'mentions', 'administration', 'app']
207INTERNAL_IPS = []
208LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
209LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
210LANGUAGE_CODE = 'en-us'
211LANGUAGE_COOKIE_AGE = None
212LANGUAGE_COOKIE_DOMAIN = None
213LANGUAGE_COOKIE_NAME = 'django_language'
214LANGUAGE_COOKIE_PATH = '/'
215LOCALE_PATHS = []
216LOGGING = {}
217LOGGING_CONFIG = 'logging.config.dictConfig'
218LOGIN_REDIRECT_URL = '/accounts/profile/'
219LOGIN_URL = '/accounts/login/'
220LOGOUT_REDIRECT_URL = None
221MANAGERS = []
222MEDIA_ROOT = '/app/media/'
223MEDIA_URL = '/media/'
224MENTIONS_CACHE_TIME = 3600
225MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
226MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
227MIGRATION_MODULES = {}
228MONTH_DAY_FORMAT = 'F j'
229NUMBER_GROUPING = 0
230PASSWORD_HASHERS = '********************'
231PASSWORD_RESET_TIMEOUT_DAYS = '********************'
232PREPEND_WWW = False
233PUSH_NOTIFICATIONS_SETTINGS = {'FCM_API_KEY': '********************', 'CONFIG': 'push_notifications.conf.LegacyConfig', 'GCM_POST_URL': 'https://android.googleapis.com/gcm/send', 'GCM_MAX_RECIPIENTS': 1000, 'GCM_ERROR_TIMEOUT': None, 'FCM_POST_URL': 'https://fcm.googleapis.com/fcm/send', 'FCM_MAX_RECIPIENTS': 1000, 'FCM_ERROR_TIMEOUT': None, 'APNS_USE_SANDBOX': True, 'APNS_USE_ALTERNATIVE_PORT': False, 'APNS_TOPIC': None, 'WNS_PACKAGE_SECURITY_ID': None, 'WNS_SECRET_KEY': '********************', 'WNS_ACCESS_URL': 'https://login.live.com/accesstoken.srf', 'WP_POST_URL': {'CHROME': 'https://fcm.googleapis.com/fcm/send', 'OPERA': 'https://fcm.googleapis.com/fcm/send', 'FIREFOX': 'https://updates.push.services.mozilla.com/wpush/v2'}, 'WP_PRIVATE_KEY': '********************', 'WP_CLAIMS': None, 'WP_ERROR_TIMEOUT': None, 'USER_MODEL': 'auth.User', 'UPDATE_ON_DUPLICATE_REG_ID': False}
234REPORT_TARGET_EMAIL = 'forafontov98@gmail.com'
235REST_FRAMEWORK = {'DEFAULT_PAGINATION_CLASS': 'mentions.paginators.FastPageNumberPagination', 'PAGE_SIZE': 25}
236ROOT_URLCONF = 'rephouse_backend.urls'
237SECRET_KEY = '********************'
238SECURE_BROWSER_XSS_FILTER = False
239SECURE_CONTENT_TYPE_NOSNIFF = False
240SECURE_HSTS_INCLUDE_SUBDOMAINS = False
241SECURE_HSTS_PRELOAD = False
242SECURE_HSTS_SECONDS = 0
243SECURE_PROXY_SSL_HEADER = None
244SECURE_REDIRECT_EXEMPT = []
245SECURE_SSL_HOST = None
246SECURE_SSL_REDIRECT = False
247SERVER_EMAIL = 'root@localhost'
248SESSION_CACHE_ALIAS = 'default'
249SESSION_COOKIE_AGE = 1209600
250SESSION_COOKIE_DOMAIN = None
251SESSION_COOKIE_HTTPONLY = True
252SESSION_COOKIE_NAME = 'sessionid'
253SESSION_COOKIE_PATH = '/'
254SESSION_COOKIE_SAMESITE = 'Lax'
255SESSION_COOKIE_SECURE = False
256SESSION_ENGINE = 'django.contrib.sessions.backends.db'
257SESSION_EXPIRE_AT_BROWSER_CLOSE = False
258SESSION_FILE_PATH = None
259SESSION_SAVE_EVERY_REQUEST = False
260SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
261SETTINGS_MODULE = 'rephouse_backend.settings'
262SHORT_DATETIME_FORMAT = 'm/d/Y P'
263SHORT_DATE_FORMAT = 'm/d/Y'
264SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
265SILENCED_SYSTEM_CHECKS = []
266SMS_CODE_TIMEOUT = 600
267STATICFILES_DIRS = ['/app/rephouse_backend/static/']
268STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
269STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
270STATIC_ROOT = '/app/static/'
271STATIC_URL = '/static/'
272SWAGGER_SETTINGS = {'DEFAULT_AUTO_SCHEMA_CLASS': 'rephouse_backend.swagger.ErrorResponseAutoSchema', 'SECURITY_DEFINITIONS': {'Token': '********************'}}
273TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/app/rephouse_backend/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}]
274TEST_NON_SERIALIZED_APPS = []
275TEST_RUNNER = 'django.test.runner.DiscoverRunner'
276THOUSAND_SEPARATOR = ','
277TIME_FORMAT = 'P'
278TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
279TIME_ZONE = 'UTC'
280TWILIO_ACCOUNT_SID = 'ACec702ed7b7799dc5eb6212b6ca973ec8'
281TWILIO_AUTH_TOKEN = '********************'
282TWILIO_SENDER = '+14155211538'
283USE_I18N = True
284USE_L10N = True
285USE_THOUSAND_SEPARATOR = False
286USE_TZ = True
287USE_X_FORWARDED_HOST = False
288USE_X_FORWARDED_PORT = False
289WSGI_APPLICATION = 'rephouse_backend.wsgi.application'
290X_FRAME_OPTIONS = 'SAMEORIGIN'
291YEAR_MONTH_FORMAT = 'F Y'
292
293
294You're seeing this error because you have DEBUG = True in your
295Django settings file. Change that to False, and Django will
296display a standard page generated by the handler for this status code.