SHARE
TWEET

Untitled

a guest Mar 20th, 2017 308 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. KeyError at /api/lasso/position/
  2. 2
  3.  
  4. Request Method: POST
  5. Request URL: http://52.41.41.153/api/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 10:58:16 -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_device_position
  82.   172.     return Response({}, status=result_map[result])
  83.  
  84. Exception Type: KeyError at /api/lasso/position/
  85. Exception Value: 2
  86. Request information:
  87. USER: 123
  88.  
  89. GET: No GET data
  90.  
  91. POST: No POST data
  92.  
  93. FILES: No FILES data
  94.  
  95. COOKIES: No cookie data
  96.  
  97. META:
  98. CONTENT_LENGTH = '39'
  99. CONTENT_TYPE = 'application/json'
  100. C_FORCE_ROOT = '1'
  101. DJANGO_SETTINGS_MODULE = 'mycoga.settings'
  102. GATEWAY_INTERFACE = 'CGI/1.1'
  103. HOME = '/root'
  104. HOSTNAME = 'ip-172-31-27-205'
  105. HTTP_ACCEPT = '*/*'
  106. HTTP_ACCEPT_ENCODING = 'gzip, deflate'
  107. HTTP_ACCEPT_LANGUAGE = 'uk-UA,uk;q=0.8,ru;q=0.6,en-US;q=0.4,en;q=0.2'
  108. HTTP_AUTHORIZATION = 'Token 83df1535f1f0f56194077c6b677a8108c726a8fb'
  109. HTTP_CACHE_CONTROL = 'no-cache'
  110. HTTP_CONNECTION = 'close'
  111. HTTP_HOST = '52.41.41.153'
  112. HTTP_ORIGIN = 'chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop'
  113. HTTP_POSTMAN_TOKEN = '7ae7fae0-2b3d-43f6-b8e3-47b4ba83745a'
  114. 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'
  115. HTTP_X_FORWARDED_FOR = '93.74.129.206'
  116. HTTP_X_REAL_IP = '93.74.129.206'
  117. OLDPWD = '/mycoga'
  118. PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
  119. PATH_INFO = '/api/lasso/position/'
  120. PWD = '/mycoga/mycoga/static'
  121. QUERY_STRING = ''
  122. REMOTE_ADDR = '127.0.0.1'
  123. REMOTE_HOST = ''
  124. REQUEST_METHOD = 'POST'
  125. RUN_MAIN = 'true'
  126. SCRIPT_NAME = ''
  127. SERVER_NAME = 'ip-172-31-27-205.us-west-2.compute.internal'
  128. SERVER_PORT = '8000'
  129. SERVER_PROTOCOL = 'HTTP/1.0'
  130. SERVER_SOFTWARE = 'WSGIServer/0.2'
  131. SUPERVISOR_ENABLED = '1'
  132. SUPERVISOR_GROUP_NAME = 'service'
  133. SUPERVISOR_PROCESS_NAME = 'service'
  134. SUPERVISOR_SERVER_URL = 'unix:///tmp/supervisor.sock'
  135. TZ = 'America/Chicago'
  136. wsgi.errors = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='ANSI_X3.4-1968'>
  137. wsgi.file_wrapper = ''
  138. wsgi.input = <_io.BufferedReader name=8>
  139. wsgi.multiprocess = False
  140. wsgi.multithread = True
  141. wsgi.run_once = False
  142. wsgi.url_scheme = 'http'
  143. wsgi.version =
  144.  
  145. Settings:
  146. Using settings module mycoga.settings
  147. ABSOLUTE_URL_OVERRIDES = {}
  148. ADMINS = []
  149. ADMIN_AJAX_URL_PREFIX = '^admin/func/ajax/'
  150. ADMIN_URL_PREFIX = '^admin/'
  151. AJAX_URL_PREFIX = 'func/ajax/'
  152. ALLOWED_HOSTS = ['*']
  153. API_URL_PREFIX = '********************'
  154. APPEND_SLASH = True
  155. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
  156. AUTH_PASSWORD_VALIDATORS = '********************'
  157. AUTH_USER_MODEL = 'authentication.User'
  158. BASE_DIR = '/mycoga/mycoga'
  159. CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
  160. CACHE_MIDDLEWARE_ALIAS = 'default'
  161. CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
  162. CACHE_MIDDLEWARE_SECONDS = 600
  163. CSRF_COOKIE_AGE = 31449600
  164. CSRF_COOKIE_DOMAIN = None
  165. CSRF_COOKIE_HTTPONLY = False
  166. CSRF_COOKIE_NAME = 'csrftoken'
  167. CSRF_COOKIE_PATH = '/'
  168. CSRF_COOKIE_SECURE = False
  169. CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
  170. CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
  171. CSRF_TRUSTED_ORIGINS = []
  172. 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'}}
  173. DATABASE_ROUTERS = []
  174. DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
  175. DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
  176. DATETIME_FORMAT = 'N j, Y, P'
  177. 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']
  178. DATE_FORMAT = 'N j, Y'
  179. 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']
  180. DEBUG = True
  181. DEBUG_PROPAGATE_EXCEPTIONS = False
  182. DECIMAL_SEPARATOR = '.'
  183. DEFAULT_CHARSET = 'utf-8'
  184. DEFAULT_CONTENT_TYPE = 'text/html'
  185. DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
  186. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  187. DEFAULT_FROM_EMAIL = 'webmaster@localhost'
  188. DEFAULT_INDEX_TABLESPACE = ''
  189. DEFAULT_TABLESPACE = ''
  190. DISALLOWED_USER_AGENTS = []
  191. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  192. EMAIL_HOST = 'localhost'
  193. EMAIL_HOST_PASSWORD = '********************'
  194. EMAIL_HOST_USER = ''
  195. EMAIL_PORT = 25
  196. EMAIL_SENDER_EXTENDED_MODE = True
  197. EMAIL_SSL_CERTFILE = None
  198. EMAIL_SSL_KEYFILE = '********************'
  199. EMAIL_SUBJECT_PREFIX = '[Django] '
  200. EMAIL_TIMEOUT = None
  201. EMAIL_USE_SSL = False
  202. EMAIL_USE_TLS = False
  203. FILE_CHARSET = 'utf-8'
  204. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
  205. FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
  206. FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
  207. FILE_UPLOAD_PERMISSIONS = None
  208. FILE_UPLOAD_TEMP_DIR = None
  209. FIRST_DAY_OF_WEEK = 0
  210. FIXTURE_DIRS = []
  211. FORCE_SCRIPT_NAME = None
  212. FORMAT_MODULE_PATH = None
  213. HTTP_HOST = 'http://127.0.0.1:8080'
  214. IGNORABLE_404_URLS = []
  215. IMAGEKIT_CACHEFILE_DIR = 'CACHE/images'
  216. IMAGEKIT_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.hash'
  217. IMAGEKIT_CACHE_BACKEND = 'default'
  218. IMAGEKIT_CACHE_PREFIX = 'imagekit:'
  219. IMAGEKIT_CACHE_TIMEOUT = 300
  220. IMAGEKIT_DEFAULT_CACHEFILE_BACKEND = 'imagekit.cachefiles.backends.Simple'
  221. IMAGEKIT_DEFAULT_CACHEFILE_STRATEGY = 'imagekit.cachefiles.strategies.JustInTime'
  222. IMAGEKIT_DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  223. IMAGEKIT_SPEC_CACHEFILE_NAMER = 'imagekit.cachefiles.namers.source_name_as_path'
  224. IMAGEKIT_USE_MEMCACHED_SAFE_CACHE_KEY = '********************'
  225. INSTALLED_APPS =
  226. INTERNAL_IPS = []
  227. JS_REVERSE_ADMIN_SITE_JS_VAR_NAME = 'AdminUrls'
  228. JS_REVERSE_JS_VAR_NAME = 'SiteUrls'
  229. JS_REVERSE_SITE_JS_VAR_NAME = 'SiteUrls'
  230. JS_REVERSE_TIMEOUT = 36000
  231. LANGUAGES =
  232. LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
  233. LANGUAGE_CODE = 'en'
  234. LANGUAGE_COOKIE_AGE = None
  235. LANGUAGE_COOKIE_DOMAIN = None
  236. LANGUAGE_COOKIE_NAME = '_local_'
  237. LANGUAGE_COOKIE_PATH = '/'
  238. LOCALE_PATHS = []
  239. 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'}}}
  240. LOGGING_CONFIG = 'logging.config.dictConfig'
  241. LOGIN_REDIRECT_URL = '/accounts/profile/'
  242. LOGIN_URL = '/admin/login/'
  243. LOGOUT_REDIRECT_URL = None
  244. LOGOUT_URL = '/admin/logout/'
  245. MANAGERS = []
  246. MEDIA_ROOT = '/mycoga/mycoga/media/'
  247. MEDIA_URL = '/media/'
  248. MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
  249. MIDDLEWARE = None
  250. MIDDLEWARE_CLASSES =
  251. MIGRATION_MODULES = {}
  252. MONTH_DAY_FORMAT = 'F j'
  253. NUMBER_GROUPING = 0
  254. OVH_APPLICATION_KEY = '********************'
  255. OVH_APPLICATION_NAME = 'Kitway'
  256. OVH_APPLICATION_SECRET = '********************'
  257. OVH_CONSUMER_KEY = '********************'
  258. OVH_ENABLED = False
  259. OVH_ENDPOINT = 'ovh-eu'
  260. OVH_SMS_SENDER_NAME = 'MyCoGa'
  261. OVH_SMS_SERVICE_NAME = 'sms-am239289-1'
  262. PASSWORD_HASHERS = '********************'
  263. PASSWORD_RESET_TIMEOUT_DAYS = '********************'
  264. PREPEND_WWW = False
  265. PROJECT_NAME = 'mycoga'
  266. 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']}
  267. ROOT_URLCONF = 'mycoga.urls'
  268. SECRET_KEY = '********************'
  269. SECURE_BROWSER_XSS_FILTER = False
  270. SECURE_CONTENT_TYPE_NOSNIFF = False
  271. SECURE_HSTS_INCLUDE_SUBDOMAINS = False
  272. SECURE_HSTS_SECONDS = 0
  273. SECURE_PROXY_SSL_HEADER = None
  274. SECURE_REDIRECT_EXEMPT = []
  275. SECURE_SSL_HOST = None
  276. SECURE_SSL_REDIRECT = False
  277. SEND_NOTIFICATIONS = False
  278. SERVER_EMAIL = 'root@localhost'
  279. SESSION_CACHE_ALIAS = 'default'
  280. SESSION_COOKIE_AGE = 36000
  281. SESSION_COOKIE_DOMAIN = None
  282. SESSION_COOKIE_HTTPONLY = True
  283. SESSION_COOKIE_NAME = 'sessionid'
  284. SESSION_COOKIE_PATH = '/'
  285. SESSION_COOKIE_SECURE = False
  286. SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
  287. SESSION_EXPIRE_AT_BROWSER_CLOSE = True
  288. SESSION_FILE_PATH = None
  289. SESSION_SAVE_EVERY_REQUEST = False
  290. SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
  291. SETTINGS_MODULE = 'mycoga.settings'
  292. SHORT_DATETIME_FORMAT = 'm/d/Y P'
  293. SHORT_DATE_FORMAT = 'm/d/Y'
  294. SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
  295. SILENCED_SYSTEM_CHECKS = []
  296. SITE_AJAX_URL_PREFIX = '^func/ajax/'
  297. SITE_URL_PREFIX = '^'
  298. SMS_SENDER_EXTENDED_MODE = True
  299. STATICFILES_DIRS =
  300. STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
  301. STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  302. STATIC_ROOT = '/mycoga/mycoga/'
  303. STATIC_URL = '/static/'
  304. SWAGGER_SETTINGS = {'JSON_EDITOR': True, 'SHOW_REQUEST_HEADERS': True}
  305. 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/']}]
  306. TEST_NON_SERIALIZED_APPS = []
  307. TEST_RUNNER = 'django.test.runner.DiscoverRunner'
  308. THOUSAND_SEPARATOR = ','
  309. TIME_FORMAT = 'P'
  310. TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
  311. TIME_ZONE = 'America/Chicago'
  312. USER_MODEL = 'authentication.User'
  313. USER_MODEL_APP = 'authentication'
  314. USER_MODEL_NAME = 'User'
  315. USER_MODEL_STR = 'mycoga.apps.authentication.models.User'
  316. USE_ETAGS = False
  317. USE_I18N = True
  318. USE_L10N = True
  319. USE_THOUSAND_SEPARATOR = False
  320. USE_TZ = False
  321. USE_X_FORWARDED_HOST = False
  322. USE_X_FORWARDED_PORT = False
  323. WSGI_APPLICATION = 'mycoga.wsgi.application'
  324. X_FRAME_OPTIONS = 'SAMEORIGIN'
  325. YEAR_MONTH_FORMAT = 'F Y'
  326.  
  327.  
  328. You're seeing this error because you have DEBUG = True in your
  329. Django settings file. Change that to False, and Django will
  330. 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