NAVADMC / ADSM

A simulation of disease spread in livestock populations. Includes detection and containment simulation.
Other
10 stars 5 forks source link

VaccinatioRingRule Matching query does not exist #953

Closed missyschoenbaum closed 5 years ago

missyschoenbaum commented 5 years ago

Steps to recreate on this are not very clear.

The first time I got it I did this: I was testing import of pop from xml and csv Save Sample Scenario as test scenario Go to Population, select delete pop Get confirmation message Go to select new pop, hit import First time it works no problem Then, if I immediately hit Delete pop again Get confirmation message Select delete

Get Yellow screen

DoesNotExist at /setup/Population/1/delete/ VaccinationRingRule matching query does not exist. Request Method: GET Request URL: http://127.0.0.1:52730/setup/Population/1/delete/ Django Version: 1.8.2 Exception Type: DoesNotExist Exception Value:
VaccinationRingRule matching query does not exist. Python Executable: C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\ADSM_Beta.exe Python Version: 3.4.2 Python Path:
['C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\ADSM_Beta.exe', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\ADSM_Beta.zip', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\library.zip', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\bin', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16\bin\env', 'C:\Users\MeSchoenbaum\Desktop\ADSM_9_16'] Server time: Fri, 12 Jul 2019 19:42:34 +0000

PATH_INFO
'/setup/Population/1/delete/' SERVER_PROTOCOL 'HTTP/1.0' QUERY_STRING
'' wsgi.errors

<_io.TextIOWrapper name='' mode='w' encoding='cp437'> HTTP_ACCEPT_ENCODING 'gzip, deflate' ACTUAL_SERVER_PROTOCOL 'HTTP/1.1' SERVER_NAME '127.0.0.1' wsgi.multiprocess False HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' REMOTE_ADDR '127.0.0.1' HTTP_REFERER 'http://127.0.0.1:52730/LoadingScreen/?loading_url=/setup/Population/1/delete/' REQUEST_URI '/setup/Population/1/delete/' REQUEST_METHOD 'GET' wsgi.run_once False wsgi.version (1, 0) wsgi.url_scheme 'http' wsgi.multithread True HTTP_ACCEPT_LANGUAGE 'en-us,en;q=0.8' HTTP_X_FORWARDED_FOR '127.0.0.1' HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like ' 'Gecko) Chrome/39.0.2171.95 Safari/537.36' SERVER_PORT '52731' wsgi.input SCRIPT_NAME '' REMOTE_PORT '52806' HTTP_X_REAL_IP '127.0.0.1' SERVER_SOFTWARE 'CherryPy/3.6.0 Server' HTTP_HOST '127.0.0.1:52730' HTTP_CONNECTION 'close' THOUSAND_SEPARATOR ',' CSIDL_PERSONAL 5 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') DEBUG_TOOLBAR_PANELS [] DATETIME_FORMAT 'N j, Y, P' YEAR_MONTH_FORMAT 'F Y' TEMPLATES [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\ADSM\\templates', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\ScenarioCreator', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\Results', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\ADSMSettings', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\django.contrib.admin', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\django.contrib.auth', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\floppyforms', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\crispy_forms', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\explorer', 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\templates\\ADSM'], 'OPTIONS': {'context_processors': ['django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', 'ADSMSettings.context_processor.adsm_context', 'ScenarioCreator.context_processor.basic_context', 'Results.context_processor.results_context']}}] ROOT_URLCONF 'ADSM.urls' ADMINS () PREPEND_WWW False SESSION_COOKIE_NAME 'sessionid' MIGRATION_MODULES {} FILE_CHARSET 'utf-8' X_FRAME_OPTIONS 'SAMEORIGIN' ALLOWED_INCLUDE_ROOTS () LANGUAGES (('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'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian 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'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('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 Bokmal'), ('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-cn', 'Simplified Chinese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese'), ('zh-tw', 'Traditional Chinese')) SCRIPT '.cmd' LOGIN_URL '/accounts/login/' DEBUG_PROPAGATE_EXCEPTIONS False SECRET_KEY '********************' SECURE_HSTS_INCLUDE_SUBDOMAINS False USE_X_FORWARDED_HOST False SESSION_COOKIE_PATH '/' SECURE_HSTS_SECONDS 0 CSRF_COOKIE_PATH '/' CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} SESSION_COOKIE_DOMAIN None EMAIL_PORT 25 DEFAULT_FROM_EMAIL 'noreply@development.server' DB_BASE_DIR 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM Beta Workspace\\settings' ABSOLUTE_URL_OVERRIDES {} SESSION_COOKIE_AGE 1209600 EMAIL_SSL_KEYFILE '********************' WSGI_APPLICATION 'ADSM.wsgi.application' SESSION_SERIALIZER 'django.contrib.sessions.serializers.JSONSerializer' ALLOWED_HOSTS [] USE_I18N False EMAIL_SUBJECT_PREFIX '[Django] ' MANAGERS () STATIC_URL '/static/' FORCE_SCRIPT_NAME None DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') DATE_FORMAT 'N j, Y' TEMPLATE_DIRS () TIME_INPUT_FORMATS ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') DATABASES {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM Beta ' 'Workspace\\settings\\settings.db', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM ' 'Beta Workspace\\settings\\test_settings.db'}, 'TIME_ZONE': 'UTC', 'USER': ''}, 'scenario_db': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM Beta ' 'Workspace\\settings\\activeSession.db', 'OPTIONS': {'timeout': 300}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM ' 'Beta ' 'Workspace\\settings\\test_activeSession.db'}, 'TIME_ZONE': 'UTC', 'USER': ''}} CSRF_COOKIE_SECURE False EMAIL_HOST_PASSWORD '********************' BASE_DIR 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16' SESSION_SAVE_EVERY_REQUEST False INSTALLED_APPS ('ScenarioCreator', 'Results', 'ADSMSettings', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'floppyforms', 'crispy_forms', 'productionserver', 'webpack_loader', 'explorer') FIRST_DAY_OF_WEEK 0 LANGUAGE_COOKIE_DOMAIN None SECURE_CONTENT_TYPE_NOSNIFF False WEBPACK_LOADER {'DEFAULT': {'BUNDLE_DIR_NAME': 'bundles/', 'STATS_FILE': 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\webpack-stats.json'}} LANGUAGE_COOKIE_PATH '/' LANGUAGE_COOKIE_AGE None 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') EMAIL_HOST_USER '' OVERRIDE_DEBUG False USE_ETAGS False TIME_ZONE 'UTC' CSRF_COOKIE_NAME 'csrftoken' EXPLORER_CONNECTION_NAME 'scenario_db' FIXTURE_DIRS () SECURE_PROXY_SSL_HEADER None APPEND_SLASH True STATIC_ROOT 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\static' FORMAT_MODULE_PATH None EMAIL_TIMEOUT None LOGGING_CONFIG 'logging.config.dictConfig' PRODUCTION_SETTINGS False SHORT_DATETIME_FORMAT 'm/d/Y P' SILENCED_SYSTEM_CHECKS [] PASSWORD_HASHERS '********************' DEBUG_TOOLBAR_CONFIG {'JQUERY_URL': '', 'SHOW_TOOLBAR_CALLBACK': 'ddt_request_history.panels.request_history.allow_ajax'} SESSION_EXPIRE_AT_BROWSER_CLOSE False USE_THOUSAND_SEPARATOR False LANGUAGE_COOKIE_NAME 'django_language' CSRF_COOKIE_DOMAIN None LOGOUT_URL '/accounts/logout/' FILE_UPLOAD_TEMP_DIR None LOGIN_REDIRECT_URL '/' SESSION_COOKIE_SECURE False SESSION_COOKIE_HTTPONLY True SESSION_ENGINE 'django.contrib.sessions.backends.db' DEBUG_TOOLBAR_PATCH_SETTINGS False EXPLORER_SQL_BLACKLIST ('ALTER', 'RENAME', 'DROP', 'TRUNCATE') EMAIL_BACKEND 'django.core.mail.backends.console.EmailBackend' DISALLOWED_USER_AGENTS () FILE_UPLOAD_DIRECTORY_PERMISSIONS None TIME_FORMAT 'P' USE_TZ True TEMPLATE_DEBUG True SECURE_SSL_HOST None OS_DIR 'windows' TEMPLATE_STRING_IF_INVALID '' IGNORABLE_404_URLS () DEFAULT_INDEX_TABLESPACE '' LOCALE_PATHS () USE_L10N True STATICFILES_DIRS ('C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\ADSM\\static',) CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') MEDIA_URL '/media/' WORKSPACE_PATH 'C:\\Users\\MeSchoenbaum\\Documents\\ADSM Beta Workspace' SIGNING_BACKEND 'django.core.signing.TimestampSigner' AUTH_USER_MODEL 'auth.User' TEST_RUNNER 'django.test.runner.DiscoverRunner' MONTH_DAY_FORMAT 'F j' EMAIL_USE_SSL False MEDIA_ROOT 'C:\\Users\\MeSchoenbaum\\Desktop\\ADSM_9_16\\media' DEFAULT_TABLESPACE '' MESSAGE_STORAGE 'django.contrib.messages.storage.fallback.FallbackStorage' LANGUAGE_CODE 'en-us' CACHE_MIDDLEWARE_KEY_PREFIX '********************' EMAIL_SSL_CERTFILE None DECIMAL_SEPARATOR '.' TEST_NON_SERIALIZED_APPS [] SHORT_DATE_FORMAT 'm/d/Y' EXPLORER_SCHEMA_EXCLUDE_TABLE_PREFIXES ('auth_', 'django_', 'south_migrationhistory', 'sqlite_master', 'sqlite_sequence') EXPLORER_DEFAULT_CONNECTION 'scenario_db' DATABASE_ROUTERS ['ScenarioCreator.router.ScenarioRouter'] DEFAULT_CONTENT_TYPE 'text/html' FILE_UPLOAD_PERMISSIONS None MIDDLEWARE_CLASSES ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'ADSMSettings.disable.DisableCSRF') EMAIL_HOST 'localhost' SECURE_REDIRECT_EXEMPT [] CRISPY_TEMPLATE_PACK 'bootstrap' EXTENSION '.exe' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' SESSION_CACHE_ALIAS 'default' TEMPLATE_LOADERS ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') DEFAULT_EXCEPTION_REPORTER_FILTER 'django.views.debug.SafeExceptionReporterFilter' SESSION_FILE_PATH None SECURE_BROWSER_XSS_FILTER False CACHE_MIDDLEWARE_SECONDS 600 LANGUAGES_BIDI ('he', 'ar', 'fa', 'ur') INTERNAL_IPS ('127.0.0.1', '::1') DEBUG True SHGFP_TYPE_CURRENT 0 EMAIL_USE_TLS False EXPLORER_CONNECTIONS {'scenario_db': 'scenario_db'} CACHE_MIDDLEWARE_ALIAS 'default' SECURE_SSL_REDIRECT False DEFAULT_CHARSET 'utf-8' CSRF_COOKIE_AGE 31449600 NUMBER_GROUPING 0 LOGGING {} AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',) CSRF_COOKIE_HTTPONLY False SERVER_EMAIL 'server@development.server' PASSWORD_RESET_TIMEOUT_DAYS '********************' SETTINGS_MODULE 'ADSM.settings' TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', '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')
missyschoenbaum commented 5 years ago

But, after it fails I can shut it, reopen and then I am ready to import again. And it works.

missyschoenbaum commented 5 years ago

I am also getting an action sometimes where I can't delete population when I have results. I can't tell if these are connected or not. I will open another ticket on that.

ConradSelig commented 5 years ago

I believe that the vaccination ring rule models are likely not being created properly. When you re-open the scenario they are going to be created however, which is why closing and opening the scenario fixes the issue. I should be able to fix this fairly easily.

missyschoenbaum commented 5 years ago

That worked, Thanks!