SHARE
TWEET

Untitled

a guest Mar 20th, 2017 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TypeError at /api/8/lasso/position/
  2. 'NoneType' object is not subscriptable
  3.  
  4. Request Method: POST
  5. Request URL: http://52.41.41.153/api/8/lasso/position/
  6. Django Version: 1.10.5
  7. Python Executable: /usr/bin/python3
  8. Python Version: 3.5.2
  9. Python Path: ['/mycoga', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages']
  10. Server time: Mon, 20 Mar 2017 07:12:43 -0500
  11. Installed Applications:
  12. ('mycoga.apps.authentication',
  13.  'modeltranslation',
  14.  'django.contrib.admin',
  15.  'django.contrib.auth',
  16.  'django.contrib.contenttypes',
  17.  'django.contrib.sessions',
  18.  'django.contrib.messages',
  19.  'django.contrib.staticfiles',
  20.  'django_js_reverse',
  21.  'django_extensions',
  22.  'rosetta',
  23.  'rest_framework',
  24.  'rest_framework.authtoken',
  25.  'rest_framework_swagger',
  26.  'imagekit',
  27.  'mycoga.libs',
  28.  'mycoga.apps.iot_device',
  29.  'mycoga.apps.iot_platform',
  30.  'mycoga.apps.website.b2b',
  31.  'mycoga.apps.website.b2c')
  32. Installed Middleware:
  33. ('django.contrib.sessions.middleware.SessionMiddleware',
  34.  'django.middleware.locale.LocaleMiddleware',
  35.  'django.middleware.common.CommonMiddleware',
  36.  'django.middleware.csrf.CsrfViewMiddleware',
  37.  'django.contrib.auth.middleware.AuthenticationMiddleware',
  38.  'django.contrib.messages.middleware.MessageMiddleware',
  39.  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  40.  'django.middleware.security.SecurityMiddleware')
  41.  
  42.  
  43. Traceback:  
  44.  
  45. File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner
  46.   39.             response = get_response(request)
  47.  
  48. File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _legacy_get_response
  49.   249.             response = self._get_response(request)
  50.  
  51. File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  52.   187.                 response = self.process_exception_by_middleware(e, request)
  53.  
  54. File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  55.   185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  56.  
  57. File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/csrf.py" in wrapped_view
  58.   58.         return view_func(*args, **kwargs)
  59.  
  60. File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py" in view
  61.   68.             return self.dispatch(request, *args, **kwargs)
  62.  
  63. File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py" in dispatch
  64.   483.             response = self.handle_exception(exc)
  65.  
  66. File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py" in handle_exception
  67.   443.             self.raise_uncaught_exception(exc)
  68.  
  69. File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py" in dispatch
  70.   480.             response = handler(request, *args, **kwargs)
  71.  
  72. File "/usr/local/lib/python3.5/dist-packages/rest_framework/decorators.py" in handler
  73.   52.             return func(*args, **kwargs)
  74.  
  75. File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/csrf.py" in wrapped_view
  76.   58.         return view_func(*args, **kwargs)
  77.  
  78. File "/usr/lib/python3.5/contextlib.py" in inner
  79.   30.                 return func(*args, **kwds)
  80.  
  81. File "/mycoga/mycoga/apps/iot_platform/services/lasso/views.py" in lasso_mobile_position
  82.   119.     result, position = LassoService(user_id, device_id).handle_mobile_position(latitude, longitude)
  83.  
  84. File "/mycoga/mycoga/apps/iot_platform/services/lasso/service.py" in handle_mobile_position
  85.   63.         lasso_params['mobile_pos']['lon'] = longitude
  86.  
  87. Exception Type: TypeError at /api/8/lasso/position/
  88. Exception Value: 'NoneType' object is not subscriptable
  89. Request information:
  90. USER: kudinov_fedor@mail.ru
  91.  
  92. GET: No GET data
  93.  
  94. POST: No POST data
  95.  
  96. FILES: No FILES data
  97.  
  98. COOKIES: No cookie data
  99.  
  100. META:
  101. CONTENT_LENGTH = '40'
  102. CONTENT_TYPE = 'application/json'
  103. C_FORCE_ROOT = '1'
  104. DJANGO_SETTINGS_MODULE = 'mycoga.settings'
  105. GATEWAY_INTERFACE = 'CGI/1.1'
  106. HOME = '/root'
  107. HOSTNAME = 'ip-172-31-27-205'
  108. HTTP_ACCEPT = '*/*'
  109. HTTP_ACCEPT_ENCODING = 'gzip, deflate'
  110. HTTP_ACCEPT_LANGUAGE = 'uk-UA,uk;q=0.8,ru;q=0.6,en-US;q=0.4,en;q=0.2'
  111. HTTP_AUTHORIZATION = 'Token a1f978d9a578d2a365ddf046c0e4ff8ee820c44e'
  112. HTTP_CACHE_CONTROL = 'no-cache'
  113. HTTP_CONNECTION = 'close'
  114. HTTP_HOST = '52.41.41.153'
  115. HTTP_ORIGIN = 'chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop'
  116. HTTP_POSTMAN_TOKEN = 'ad084129-8424-0780-c59f-779bcee864ea'
  117. HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
  118. HTTP_X_FORWARDED_FOR = '93.74.129.206'
  119. HTTP_X_REAL_IP = '93.74.129.206'
  120. OLDPWD = '/mycoga'
  121. PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
  122. PATH_INFO = '/api/8/lasso/position/'
  123. PWD = '/mycoga/mycoga/static'
  124. QUERY_STRING = ''
  125. REMOTE_ADDR = '127.0.0.1'
  126. REMOTE_HOST = ''
  127. REQUEST_METHOD = 'POST'
  128. RUN_MAIN = 'true'
  129. SCRIPT_NAME = ''
  130. SERVER_NAME = 'ip-172-31-27-205.us-west-2.compute.internal'
  131. SERVER_PORT = '8000'
  132. SERVER_PROTOCOL = 'HTTP/1.0'
  133. SERVER_SOFTWARE = 'WSGIServer/0.2'
  134. SUPERVISOR_ENABLED = '1'
  135. SUPERVISOR_GROUP_NAME = 'service'
  136. SUPERVISOR_PROCESS_NAME = 'service'
  137. SUPERVISOR_SERVER_URL = 'unix:///tmp/supervisor.sock'
  138. TZ = 'America/Chicago'
  139. wsgi.errors = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='ANSI_X3.4-1968'>
  140. wsgi.file_wrapper = ''
  141. wsgi.input = <_io.BufferedReader name=8>
  142. wsgi.multiprocess = False
  143. wsgi.multithread = True
  144. wsgi.run_once = False
  145. wsgi.url_scheme = 'http'
  146. wsgi.version =
  147.  
  148. Settings:
  149. Using settings module mycoga.settings
  150. ABSOLUTE_URL_OVERRIDES = {}
  151. ADMINS = []
  152. ADMIN_AJAX_URL_PREFIX = '^admin/func/ajax/'
  153. ADMIN_URL_PREFIX = '^admin/'
  154. AJAX_URL_PREFIX = 'func/ajax/'
  155. ALLOWED_HOSTS = ['*']
  156. API_URL_PREFIX = '********************'
  157. APPEND_SLASH = True
  158. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
  159. AUTH_PASSWORD_VALIDATORS = '********************'
  160. AUTH_USER_MODEL = 'authentication.User'
  161. BASE_DIR = '/mycoga/mycoga'
  162. CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
  163. CACHE_MIDDLEWARE_ALIAS = 'default'
  164. CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
  165. CACHE_MIDDLEWARE_SECONDS = 600
  166. CSRF_COOKIE_AGE = 31449600
  167. CSRF_COOKIE_DOMAIN = None
  168. CSRF_COOKIE_HTTPONLY = False
  169. CSRF_COOKIE_NAME = 'csrftoken'
  170. CSRF_COOKIE_PATH = '/'
  171. CSRF_COOKIE_SECURE = False
  172. CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
  173. CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
  174. CSRF_TRUSTED_ORIGINS = []
  175. DATABASES = {'default': {'ATOMIC_REQUESTS': False, 'CONN_MAX_AGE': 0, 'TEST': {'MIRROR': None, 'CHARSET': None, 'COLLATION': None, 'NAME': None}, 'HOST': '127.0.0.1', 'TIME_ZONE': None, 'NAME': 'mycoga_db', 'AUTOCOMMIT': True, 'OPTIONS': {}, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'PASSWORD': '********************', 'PORT': '5432', 'USER': 'mycoga'}}
  176. DATABASE_ROUTERS = []
  177. DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
  178. DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
  179. DATETIME_FORMAT = 'N j, Y, P'
  180. 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']
  181. DATE_FORMAT = 'N j, Y'
  182. 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']
  183. DEBUG = True
  184. DEBUG_PROPAGATE_EXCEPTIONS = False
  185. DECIMAL_SEPARATOR = '.'
  186. DEFAULT_CHARSET = 'utf-8'
  187. DEFAULT_CONTENT_TYPE = 'text/html'
  188. DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
  189. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  190. DEFAULT_FROM_EMAIL = 'webmaster@localhost'
  191. DEFAULT_INDEX_TABLESPACE = ''
  192. DEFAULT_TABLESPACE = ''
  193. DISALLOWED_USER_AGENTS = []
  194. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  195. EMAIL_HOST = 'localhost'
  196. EMAIL_HOST_PASSWORD = '********************'
  197. EMAIL_HOST_USER = ''
  198. EMAIL_PORT = 25
  199. EMAIL_SENDER_EXTENDED_MODE = True
  200. EMAIL_SSL_CERTFILE = None
  201. EMAIL_SSL_KEYFILE = '********************'
  202. EMAIL_SUBJECT_PREFIX = '[Django] '
  203. EMAIL_TIMEOUT = None
  204. EMAIL_USE_SSL = False
  205. EMAIL_USE_TLS = False
  206. FILE_CHARSET = 'utf-8'
  207. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
  208. FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
  209. FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
  210. FILE_UPLOAD_PERMISSIONS = None
  211. FILE_UPLOAD_TEMP_DIR = None
  212. FIRST_DAY_OF_WEEK = 0
  213. FIXTURE_DIRS = []
  214. FORCE_SCRIPT_NAME = None
  215. FORMAT_MODULE_PATH = None
  216. HTTP_HOST = 'http://127.0.0.1:8080'
  217. IGNORABLE_404_URLS = []
  218. IMAGEKIT_CACHEFILE_DIR = 'CACHE/images'
  219. IMAGEKIT_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.hash'
  220. IMAGEKIT_CACHE_BACKEND = 'default'
  221. IMAGEKIT_CACHE_PREFIX = 'imagekit:'
  222. IMAGEKIT_CACHE_TIMEOUT = 300
  223. IMAGEKIT_DEFAULT_CACHEFILE_BACKEND = 'imagekit.cachefiles.backends.Simple'
  224. IMAGEKIT_DEFAULT_CACHEFILE_STRATEGY = 'imagekit.cachefiles.strategies.JustInTime'
  225. IMAGEKIT_DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  226. IMAGEKIT_SPEC_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.source_name_as_path'
  227. IMAGEKIT_USE_MEMCACHED_SAFE_CACHE_KEY = '********************'
  228. INSTALLED_APPS =
  229. INTERNAL_IPS = []
  230. JS_REVERSE_ADMIN_SITE_JS_VAR_NAME = 'AdminUrls'
  231. JS_REVERSE_JS_VAR_NAME = 'SiteUrls'
  232. JS_REVERSE_SITE_JS_VAR_NAME = 'SiteUrls'
  233. JS_REVERSE_TIMEOUT = 36000
  234. LANGUAGES =
  235. LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
  236. LANGUAGE_CODE = 'en'
  237. LANGUAGE_COOKIE_AGE = None
  238. LANGUAGE_COOKIE_DOMAIN = None
  239. LANGUAGE_COOKIE_NAME = '_local_'
  240. LANGUAGE_COOKIE_PATH = '/'
  241. LOCALE_PATHS = []
  242. LOGGING = {'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'version': 1, 'handlers': {'null': {'level': 'DEBUG', 'class': 'logging.NullHandler'}, 'debug_file': {'filename': 'mycoga/var/logs/debug.log', 'backupCount': 10, 'maxBytes': 500000, 'formatter': 'verbose', 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler'}, 'console': {'formatter': 'simple', 'level': 'DEBUG', 'class': 'logging.StreamHandler'}, 'error_file': {'filename': 'mycoga/var/logs/error.log', 'backupCount': 3, 'maxBytes': 500000, 'formatter': 'verbose', 'level': 'ERROR', 'class': 'logging.handlers.RotatingFileHandler'}}, 'loggers': {'django.server': {'handlers': ['console', 'debug_file'], 'level': 'DEBUG', 'propagate': True}, 'mycoga': {'handlers': ['console', 'debug_file'], 'level': 'DEBUG', 'propagate': True}, 'django': {'handlers': ['console', 'error_file'], 'level': 'ERROR', 'propagate': True}}, 'disable_existing_loggers': False, 'formatters': {'simple': {'format': '%(levelname)s %(asctime)s %(module)s %(message)s'}, 'verbose': {'format': '[%(asctime)s] %(levelname)s [%(name)s:%(module)s:%(lineno)s] %(message)s', 'datefmt': '%d/%b/%Y %H:%M:%S'}}}
  243. LOGGING_CONFIG = 'logging.config.dictConfig'
  244. LOGIN_REDIRECT_URL = '/accounts/profile/'
  245. LOGIN_URL = '/admin/login/'
  246. LOGOUT_REDIRECT_URL = None
  247. LOGOUT_URL = '/admin/logout/'
  248. MANAGERS = []
  249. MEDIA_ROOT = '/mycoga/mycoga/media/'
  250. MEDIA_URL = '/media/'
  251. MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
  252. MIDDLEWARE = None
  253. MIDDLEWARE_CLASSES =
  254. MIGRATION_MODULES = {}
  255. MONTH_DAY_FORMAT = 'F j'
  256. NUMBER_GROUPING = 0
  257. OVH_APPLICATION_KEY = '********************'
  258. OVH_APPLICATION_NAME = 'Kitway'
  259. OVH_APPLICATION_SECRET = '********************'
  260. OVH_CONSUMER_KEY = '********************'
  261. OVH_ENABLED = False
  262. OVH_ENDPOINT = 'ovh-eu'
  263. OVH_SMS_SENDER_NAME = 'MyCoGa'
  264. OVH_SMS_SERVICE_NAME = 'sms-am239289-1'
  265. PASSWORD_HASHERS = '********************'
  266. PASSWORD_RESET_TIMEOUT_DAYS = '********************'
  267. PREPEND_WWW = False
  268. PROJECT_NAME = 'mycoga'
  269. REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated'], 'DEFAULT_MODEL_SERIALIZER_CLASS': 'rest_framework.serializers.ModelSerializer', 'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication']}
  270. ROOT_URLCONF = 'mycoga.urls'
  271. SECRET_KEY = '********************'
  272. SECURE_BROWSER_XSS_FILTER = False
  273. SECURE_CONTENT_TYPE_NOSNIFF = False
  274. SECURE_HSTS_INCLUDE_SUBDOMAINS = False
  275. SECURE_HSTS_SECONDS = 0
  276. SECURE_PROXY_SSL_HEADER = None
  277. SECURE_REDIRECT_EXEMPT = []
  278. SECURE_SSL_HOST = None
  279. SECURE_SSL_REDIRECT = False
  280. SEND_NOTIFICATIONS = False
  281. SERVER_EMAIL = 'root@localhost'
  282. SESSION_CACHE_ALIAS = 'default'
  283. SESSION_COOKIE_AGE = 36000
  284. SESSION_COOKIE_DOMAIN = None
  285. SESSION_COOKIE_HTTPONLY = True
  286. SESSION_COOKIE_NAME = 'sessionid'
  287. SESSION_COOKIE_PATH = '/'
  288. SESSION_COOKIE_SECURE = False
  289. SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
  290. SESSION_EXPIRE_AT_BROWSER_CLOSE = True
  291. SESSION_FILE_PATH = None
  292. SESSION_SAVE_EVERY_REQUEST = False
  293. SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
  294. SETTINGS_MODULE = 'mycoga.settings'
  295. SHORT_DATETIME_FORMAT = 'm/d/Y P'
  296. SHORT_DATE_FORMAT = 'm/d/Y'
  297. SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
  298. SILENCED_SYSTEM_CHECKS = []
  299. SITE_AJAX_URL_PREFIX = '^func/ajax/'
  300. SITE_URL_PREFIX = '^'
  301. SMS_SENDER_EXTENDED_MODE = True
  302. STATICFILES_DIRS =
  303. STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
  304. STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  305. STATIC_ROOT = '/mycoga/mycoga/'
  306. STATIC_URL = '/static/'
  307. SWAGGER_SETTINGS = {'JSON_EDITOR': True, 'SHOW_REQUEST_HEADERS': True}
  308. TEMPLATES = [{'OPTIONS': {'libraries': {}, 'context_processors': ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages']}, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'DIRS': ['/mycoga/mycoga/templates/']}]
  309. TEST_NON_SERIALIZED_APPS = []
  310. TEST_RUNNER = 'django.test.runner.DiscoverRunner'
  311. THOUSAND_SEPARATOR = ','
  312. TIME_FORMAT = 'P'
  313. TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
  314. TIME_ZONE = 'America/Chicago'
  315. USER_MODEL = 'authentication.User'
  316. USER_MODEL_APP = 'authentication'
  317. USER_MODEL_NAME = 'User'
  318. USER_MODEL_STR = 'mycoga.apps.authentication.models.User'
  319. USE_ETAGS = False
  320. USE_I18N = True
  321. USE_L10N = True
  322. USE_THOUSAND_SEPARATOR = False
  323. USE_TZ = False
  324. USE_X_FORWARDED_HOST = False
  325. USE_X_FORWARDED_PORT = False
  326. WSGI_APPLICATION = 'mycoga.wsgi.application'
  327. X_FRAME_OPTIONS = 'SAMEORIGIN'
  328. YEAR_MONTH_FORMAT = 'F Y'
  329.  
  330.  
  331. You're seeing this error because you have DEBUG = True in your
  332. Django settings file. Change that to False, and Django will
  333. 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