SHARE
TWEET

Untitled

a guest May 22nd, 2019 134 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AttributeError at /api/user
  2. 'NoneType' object has no attribute 'lower'
  3.  
  4. Request Method: GET
  5. Request URL: http://polydon-gdeprozrak-api-dev.gdeprozrak.teamcsrv.com/api/user
  6. Django Version: 2.1.5
  7. Python Executable: /usr/local/lib/pyenv/versions/3.6.8/bin/python3.6
  8. Python Version: 3.6.8
  9. Python Path: ['/app', '/usr/local/lib/pyenv/versions/3.6.8/bin', '/usr/local/lib/pyenv/versions/3.6.8/lib/python36.zip', '/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6', '/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/lib-dynload', '/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages', '/app']
  10. Server time: Ср, 22 Май 2019 14:05:38 +0000
  11. Installed Applications:
  12. ['django.contrib.admin',
  13.  'django.contrib.auth',
  14.  'django.contrib.sites',
  15.  'django.contrib.staticfiles',
  16.  'django.contrib.contenttypes',
  17.  'django.contrib.sessions',
  18.  'rest_framework',
  19.  'allauth',
  20.  'allauth.account',
  21.  'allauth.socialaccount',
  22.  'allauth.socialaccount.providers.google',
  23.  'allauth.socialaccount.providers.facebook',
  24.  'allauth.socialaccount.providers.vk',
  25.  'rest_auth.registration',
  26.  'gdeprozrak_api.apps.GdeprozrakApiConfig']
  27. Installed Middleware:
  28. ['gdeprozrak_api.middleware.CORSMiddleware',
  29.  'gdeprozrak_api.middleware.GeoserverCacheAuthMiddleware',
  30.  'django.middleware.security.SecurityMiddleware',
  31.  'django.contrib.sessions.middleware.SessionMiddleware',
  32.  'django.middleware.locale.LocaleMiddleware',
  33.  'django.middleware.common.CommonMiddleware',
  34.  'django.contrib.messages.middleware.MessageMiddleware',
  35.  'django.contrib.auth.middleware.AuthenticationMiddleware',
  36.  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  37.  'gdeprozrak_api.middleware.ErrorMiddleware']
  38.  
  39.  
  40. Traceback:
  41.  
  42. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  43.   34.             response = get_response(request)
  44.  
  45. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  46.   126.                 response = self.process_exception_by_middleware(e, request)
  47.  
  48. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  49.   124.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  50.  
  51. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  52.   54.         return view_func(*args, **kwargs)
  53.  
  54. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/django/views/generic/base.py" in view
  55.   68.             return self.dispatch(request, *args, **kwargs)
  56.  
  57. File "/app/gdeprozrak_api/base/views.py" in dispatch
  58.   30.         resp = super(BaseAPIView, self).dispatch(*args, **kwargs)
  59.  
  60. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  61.   495.             response = self.handle_exception(exc)
  62.  
  63. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
  64.   455.             self.raise_uncaught_exception(exc)
  65.  
  66. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  67.   492.             response = handler(request, *args, **kwargs)
  68.  
  69. File "/app/gdeprozrak_api/views/user.py" in get
  70.   52.         return Response(serializer.data, status=status.HTTP_200_OK)
  71.  
  72. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/rest_framework/serializers.py" in data
  73.   563.         ret = super(Serializer, self).data
  74.  
  75. File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/rest_framework/serializers.py" in data
  76.   262.                 self._data = self.to_representation(self.instance)
  77.  
  78. File "/app/gdeprozrak_api/serializers.py" in to_representation
  79.   276.         instance.avatar = 'https://www.gravatar.com/avatar/%s?s=%s' % (hashlib.md5(instance.email.lower().encode('utf8')).hexdigest(), self.context['size'])
  80.  
  81. Exception Type: AttributeError at /api/user
  82. Exception Value: 'NoneType' object has no attribute 'lower'
  83. Request information:
  84. USER: it.harder
  85.  
  86. GET: No GET data
  87.  
  88. POST: No POST data
  89.  
  90. FILES: No FILES data
  91.  
  92. COOKIES:
  93. sessionid = '5d5yzeebh3ze75276vr2g73x8qbposjd'
  94.  
  95. META:
  96. HTTP_ACCEPT = 'application/json, text/plain, */*'
  97. HTTP_ACCEPT_ENCODING = 'br, gzip, deflate'
  98. HTTP_ACCEPT_LANGUAGE = 'ru'
  99. HTTP_AUTHORIZATION = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyOSwidXNlcm5hbWUiOiJpdC5oYXJkZXIiLCJleHAiOjE1NjEyMTIzMzgsImVtYWlsIjpudWxsLCJvcmlnX2lhdCI6MTU1ODUzMzkzOH0.q2LQhUquaihW57HctrYkdfs5z8UTRy5xgcCjfK2TrG4'
  100. HTTP_CONNECTION = 'close'
  101. HTTP_COOKIE = 'sessionid=5d5yzeebh3ze75276vr2g73x8qbposjd'
  102. HTTP_HOST = 'polydon-gdeprozrak-api-dev.gdeprozrak.teamcsrv.com'
  103. HTTP_USER_AGENT = 'hydronom/1 CFNetwork/978.0.7 Darwin/18.5.0'
  104. HTTP_X_FORWARDED_FOR = '10.132.0.13'
  105. HTTP_X_FORWARDED_HOST = 'polydon-gdeprozrak-api-dev.gdeprozrak.teamcsrv.com'
  106. HTTP_X_FORWARDED_PORT = '443'
  107. HTTP_X_FORWARDED_PROTO = 'https'
  108. HTTP_X_ORIGINAL_URI = '/api/user'
  109. HTTP_X_REAL_IP = '10.132.0.13'
  110. HTTP_X_SCHEME = 'https'
  111. PATH_INFO = '/api/user'
  112. QUERY_STRING = ''
  113. RAW_URI = '/api/user'
  114. REMOTE_ADDR = '10.56.139.4'
  115. REMOTE_PORT = '56542'
  116. REQUEST_METHOD = 'GET'
  117. SCRIPT_NAME = ''
  118. SERVER_NAME = '0.0.0.0'
  119. SERVER_PORT = '8080'
  120. SERVER_PROTOCOL = 'HTTP/1.1'
  121. SERVER_SOFTWARE = 'gunicorn/19.9.0'
  122. gunicorn.socket = <gevent._socket3.socket object, fd=11, family=2, type=2049, proto=0>
  123. wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f2d7d46d5f8>
  124. wsgi.file_wrapper = ''
  125. wsgi.input = <gunicorn.http.body.Body object at 0x7f2d7d46d208>
  126. wsgi.multiprocess = True
  127. wsgi.multithread = True
  128. wsgi.run_once = False
  129. wsgi.url_scheme = 'http'
  130. wsgi.version = '(1, 0)'
  131.  
  132. Settings:
  133. Using settings module gdeprozrak_project.settings
  134. ABSOLUTE_URL_OVERRIDES = {}
  135. ACCOUNT_ADAPTER = 'gdeprozrak_auth.adapter.DefaultAccountAdapterCustom'
  136. ACCOUNT_AUTHENTICATION_METHOD = 'email'
  137. ACCOUNT_EMAIL_REQUIRED = True
  138. ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
  139. ACCOUNT_USERNAME_REQUIRED = False
  140. ADAPTER = 'gdeprozrak_auth.adapter.DefaultAccountAdapterCustom'
  141. ADMINS = []
  142. ALLOWED_HOSTS = ['polydon-gdeprozrak-api-dev.gdeprozrak.teamcsrv.com', 'polydon-gdeprozrak-dev-polydon-gdeprozrak-api']
  143. APPEND_SLASH = True
  144. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend']
  145. AUTH_PASSWORD_VALIDATORS = '********************'
  146. AUTH_USER_MODEL = 'gdeprozrak_api.GdeprozrakUser'
  147. BASE_DIR = '/app'
  148. CACHES = {'default': {'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://h:5t9pTMJDFwMVyu6z@polydon-gdeprozrak-dev-redis-master:6379/0', 'KEY_PREFIX': '********************'}}
  149. CACHE_MIDDLEWARE_ALIAS = 'default'
  150. CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
  151. CACHE_MIDDLEWARE_SECONDS = 600
  152. CELERY_ACCEPT_CONTENT = ['json']
  153. CELERY_BROKER_URL = 'redis://h:5t9pTMJDFwMVyu6z@polydon-gdeprozrak-dev-redis-master:6379/0'
  154. CELERY_RESULT_BACKEND = 'redis://h:5t9pTMJDFwMVyu6z@polydon-gdeprozrak-dev-redis-master:6379/0'
  155. CELERY_TASK_SERIALIZER = 'json'
  156. CONFIRM_EMAIL_ON_GET = True
  157. CSRF_COOKIE_AGE = 31449600
  158. CSRF_COOKIE_DOMAIN = None
  159. CSRF_COOKIE_HTTPONLY = False
  160. CSRF_COOKIE_NAME = 'csrftoken'
  161. CSRF_COOKIE_PATH = '/'
  162. CSRF_COOKIE_SAMESITE = 'Lax'
  163. CSRF_COOKIE_SECURE = False
  164. CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
  165. CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
  166. CSRF_TRUSTED_ORIGINS = []
  167. CSRF_USE_SESSIONS = False
  168. DATABASES = {'default': {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': 'postgis', 'PASSWORD': '********************', 'HOST': 'polydon-gdeprozrak-dev-polydon-gdeprozrak-postgis', 'PORT': 5432, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
  169. DATABASE_ROUTERS = []
  170. DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
  171. DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
  172. DATETIME_FORMAT = 'N j, Y, P'
  173. DATETIME_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']
  174. DATE_FORMAT = 'N j, Y'
  175. DATE_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']
  176. DEBUG = True
  177. DEBUG_PROPAGATE_EXCEPTIONS = False
  178. DECIMAL_SEPARATOR = '.'
  179. DEFAULT_CHARSET = 'utf-8'
  180. DEFAULT_CONTENT_TYPE = 'text/html'
  181. DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
  182. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  183. DEFAULT_FROM_EMAIL = 'no-reply@gdeprozrak.ru'
  184. DEFAULT_INDEX_TABLESPACE = ''
  185. DEFAULT_TABLESPACE = ''
  186. DISALLOWED_USER_AGENTS = []
  187. EMAIL_BACKEND = 'sendgrid_backend.SendgridBackend'
  188. EMAIL_HOST = 'localhost'
  189. EMAIL_HOST_PASSWORD = '********************'
  190. EMAIL_HOST_USER = ''
  191. EMAIL_PORT = 25
  192. EMAIL_SSL_CERTFILE = None
  193. EMAIL_SSL_KEYFILE = '********************'
  194. EMAIL_SUBJECT_PREFIX = '[Django] '
  195. EMAIL_TIMEOUT = None
  196. EMAIL_USE_LOCALTIME = False
  197. EMAIL_USE_SSL = False
  198. EMAIL_USE_TLS = False
  199. ENV = 'dev'
  200. FILE_CHARSET = 'utf-8'
  201. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
  202. FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
  203. FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
  204. FILE_UPLOAD_PERMISSIONS = None
  205. FILE_UPLOAD_TEMP_DIR = None
  206. FIRST_DAY_OF_WEEK = 0
  207. FIXTURE_DIRS = []
  208. FORCE_SCRIPT_NAME = None
  209. FORMAT_MODULE_PATH = None
  210. FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
  211. IGNORABLE_404_URLS = []
  212. INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.sites', 'django.contrib.staticfiles', 'django.contrib.contenttypes', 'django.contrib.sessions', 'rest_framework', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.google', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.vk', 'rest_auth.registration', 'gdeprozrak_api.apps.GdeprozrakApiConfig']
  213. INTERNAL_IPS = []
  214. JWT_AUTH = {'JWT_EXPIRATION_DELTA': datetime.timedelta(31), 'JWT_ALLOW_REFRESH': True, 'JWT_AUTH_HEADER_PREFIX': 'Bearer'}
  215. LANGUAGES = [('en', 'Английский'), ('ru', 'Русский')]
  216. LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
  217. LANGUAGE_CODE = 'en-us'
  218. LANGUAGE_COOKIE_AGE = None
  219. LANGUAGE_COOKIE_DOMAIN = None
  220. LANGUAGE_COOKIE_NAME = 'django_language'
  221. LANGUAGE_COOKIE_PATH = '/'
  222. LOCALE_PATHS = []
  223. LOGGING = {'version': 1, 'disable_existing_loggers': False, 'handlers': {'console': {'class': 'logging.StreamHandler'}}, 'loggers': {'django': {'handlers': ['console'], 'level': 'DEBUG'}}}
  224. LOGGING_CONFIG = 'logging.config.dictConfig'
  225. LOGIN_REDIRECT_URL = '/accounts/profile/'
  226. LOGIN_URL = '/accounts/login/'
  227. LOGOUT_REDIRECT_URL = None
  228. MANAGERS = []
  229. MEDIA_ROOT = ''
  230. MEDIA_URL = ''
  231. MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
  232. MIDDLEWARE = ['gdeprozrak_api.middleware.CORSMiddleware', 'gdeprozrak_api.middleware.GeoserverCacheAuthMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'gdeprozrak_api.middleware.ErrorMiddleware']
  233. MIGRATION_MODULES = {}
  234. MONTH_DAY_FORMAT = 'F j'
  235. NUMBER_GROUPING = 0
  236. OLD_PASSWORD_FIELD_ENABLED = '********************'
  237. PASSWORD_HASHERS = '********************'
  238. PASSWORD_RESET_TIMEOUT_DAYS = '********************'
  239. PKG = <class 'config_pkg.PKG'>
  240. PREPEND_WWW = False
  241. REDIS_URL = 'redis://h:5t9pTMJDFwMVyu6z@polydon-gdeprozrak-dev-redis-master:6379/0'
  242. REST_AUTH_SERIALIZERS = {'PASSWORD_RESET_SERIALIZER': '********************', 'USER_DETAILS_SERIALIZER': 'gdeprozrak_auth.serializers.GdeprozrakUserDetailsSerializer'}
  243. REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework_jwt.authentication.JSONWebTokenAuthentication']}
  244. REST_USE_JWT = True
  245. ROOT_URLCONF = 'gdeprozrak_project.urls'
  246. SECRET_KEY = '********************'
  247. SECURE_BROWSER_XSS_FILTER = False
  248. SECURE_CONTENT_TYPE_NOSNIFF = False
  249. SECURE_HSTS_INCLUDE_SUBDOMAINS = False
  250. SECURE_HSTS_PRELOAD = False
  251. SECURE_HSTS_SECONDS = 0
  252. SECURE_PROXY_SSL_HEADER = None
  253. SECURE_REDIRECT_EXEMPT = []
  254. SECURE_SSL_HOST = None
  255. SECURE_SSL_REDIRECT = False
  256. SENDGRID_API_KEY = '********************'
  257. SENDGRID_SANDBOX_MODE_IN_DEBUG = False
  258. SERVER_EMAIL = 'root@localhost'
  259. SESSION_CACHE_ALIAS = 'default'
  260. SESSION_COOKIE_AGE = 1209600
  261. SESSION_COOKIE_DOMAIN = None
  262. SESSION_COOKIE_HTTPONLY = True
  263. SESSION_COOKIE_NAME = 'sessionid'
  264. SESSION_COOKIE_PATH = '/'
  265. SESSION_COOKIE_SAMESITE = 'Lax'
  266. SESSION_COOKIE_SECURE = False
  267. SESSION_ENGINE = 'django.contrib.sessions.backends.db'
  268. SESSION_EXPIRE_AT_BROWSER_CLOSE = False
  269. SESSION_FILE_PATH = None
  270. SESSION_SAVE_EVERY_REQUEST = False
  271. SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
  272. SETTINGS_MODULE = 'gdeprozrak_project.settings'
  273. SHORT_DATETIME_FORMAT = 'm/d/Y P'
  274. SHORT_DATE_FORMAT = 'm/d/Y'
  275. SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
  276. SILENCED_SYSTEM_CHECKS = []
  277. SITE_ID = 1
  278. SRV = 'gdeprozrak'
  279. STATICFILES_DIRS = []
  280. STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
  281. STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  282. STATIC_ROOT = None
  283. STATIC_URL = '/static/'
  284. TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth']}}]
  285. TEST_NON_SERIALIZED_APPS = []
  286. TEST_RUNNER = 'django.test.runner.DiscoverRunner'
  287. THOUSAND_SEPARATOR = ','
  288. TIME_FORMAT = 'P'
  289. TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
  290. TIME_ZONE = 'UTC'
  291. URL_FRONT = 'https://polydon-gdeprozrak-web-dev.gdeprozrak.teamcsrv.com/'
  292. USE_I18N = True
  293. USE_L10N = True
  294. USE_THOUSAND_SEPARATOR = False
  295. USE_TZ = True
  296. USE_X_FORWARDED_HOST = False
  297. USE_X_FORWARDED_PORT = False
  298. VERSION = '0.7.23'
  299. WSGI_APPLICATION = 'gdeprozrak_project.wsgi.application'
  300. X_FRAME_OPTIONS = 'SAMEORIGIN'
  301. YEAR_MONTH_FORMAT = 'F Y'
  302.  
  303.  
  304. You're seeing this error because you have DEBUG = True in your
  305. Django settings file. Change that to False, and Django will
  306. display a standard page generated by the handler for this status code.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top