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