specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
66 stars 36 forks source link

Python3: Exception on generating or opening a label #677

Closed maxpatiiuk closed 4 years ago

maxpatiiuk commented 4 years ago

Python3: Exception on generating or opening a label

Happens for any form that has Generate Labels button Same problem if I press the Generate Label on Save checkbox Same problem if I go directly to the Reports tab and click on any report

TypeError at /api/specify/spappresourcedata/
Object of type 'bytes' is not JSON serializable

Request Method: GET
Request URL: http://db6.biwebdbtest.nhm.ku.edu/api/specify/spappresourcedata/?domainfilter=false&spappresource=59&offset=0
Django Version: 2.2.10
Python Executable: /opt/specify7/ve/bin/python
Python Version: 3.6.9
Python Path: ['/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/opt/specify7/ve/lib/python3.6/site-packages', '/opt/specify7']
Server time: Thu, 25 Jun 2020 08:39:50 -0500
Installed Applications:
('django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'specifyweb.specify',
 'specifyweb.stored_queries',
 'specifyweb.businessrules',
 'specifyweb.express_search',
 'specifyweb.context',
 'specifyweb.attachment_gw',
 'specifyweb.frontend',
 'specifyweb.barvis',
 'specifyweb.report_runner',
 'specifyweb.interactions',
 'specifyweb.workbench',
 'specifyweb.notifications',
 'specifyweb.export',
 'specifyweb.raven_placeholder')
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'specifyweb.context.middleware.ContextMiddleware']

Traceback:

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/specify7/specifyweb/specify/views.py" in wrapped
  22.             return view(request, *args, **kwargs)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/views/decorators/cache.py" in _cache_controlled
  31.             response = viewfunc(request, *args, **kw)

File "/opt/specify7/specifyweb/specify/views.py" in wrapped
  30.         return view(request, *args, **kwargs)

File "/opt/specify7/specifyweb/specify/views.py" in view
  44.             return dispatch_func(request, *args, **kwargs)

File "/opt/specify7/specifyweb/specify/api.py" in collection_dispatch
  170.         resp = HttpResponse(toJson(data), content_type='application/json')

File "/opt/specify7/specifyweb/specify/api.py" in toJson
  37.     return json.dumps(obj, cls=JsonEncoder)

File "/usr/lib/python3.6/json/__init__.py" in dumps
  238.         **kw).encode(obj)

File "/usr/lib/python3.6/json/encoder.py" in encode
  199.         chunks = self.iterencode(o, _one_shot=True)

File "/usr/lib/python3.6/json/encoder.py" in iterencode
  257.         return _iterencode(o, 0)

File "/opt/specify7/specifyweb/specify/api.py" in default
  34.         return json.JSONEncoder.default(self, obj)

File "/usr/lib/python3.6/json/encoder.py" in default
  180.                         o.__class__.__name__)

Exception Type: TypeError at /api/specify/spappresourcedata/
Exception Value: Object of type 'bytes' is not JSON serializable
Request information:
USER: Specifyuser object (1)

GET:
domainfilter = 'false'
spappresource = '59'
offset = '0'

POST: No POST data

FILES: No FILES data

COOKIES:
1.sp-print-on-save.CollectionObject.generateLabelChk = 'true'
csrftoken = 'ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV'
collection = '4'
sessionid = 'trvzya97v6tlvy2w44oj6vzdjbn85fjm'

META:
CONTEXT_DOCUMENT_ROOT = '/var/www/html'
CONTEXT_PREFIX = ''
CSRF_COOKIE = 'ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV'
DOCUMENT_ROOT = '/var/www/html'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTP_ACCEPT = 'application/json, text/javascript, */*; q=0.01'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_ACCEPT_LANGUAGE = 'en-us'
HTTP_CONNECTION = 'Keep-Alive'
HTTP_COOKIE = '1.sp-print-on-save.CollectionObject.generateLabelChk=true; csrftoken=ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV; collection=4; sessionid=trvzya97v6tlvy2w44oj6vzdjbn85fjm'
HTTP_HOST = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_REFERER = 'http://db6.biwebdbtest.nhm.ku.edu/specify/view/collectionobject/new/'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15'
HTTP_X_FORWARDED_FOR = '10.125.131.69'
HTTP_X_FORWARDED_HOST = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_X_FORWARDED_SERVER = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = '/api/specify/spappresourcedata/'
PATH_TRANSLATED = '/opt/specify7/specifyweb.wsgi/api/specify/spappresourcedata/'
QUERY_STRING = 'domainfilter=false&spappresource=59&offset=0'
REMOTE_ADDR = '172.17.0.1'
REMOTE_PORT = '54324'
REQUEST_METHOD = 'GET'
REQUEST_SCHEME = 'http'
REQUEST_URI = '/api/specify/spappresourcedata/?domainfilter=false&spappresource=59&offset=0'
SCRIPT_FILENAME = '/opt/specify7/specifyweb.wsgi'
SCRIPT_NAME = ''
SERVER_ADDR = '172.17.0.2'
SERVER_ADMIN = '[no address given]'
SERVER_NAME = 'db6.biwebdbtest.nhm.ku.edu'
SERVER_PORT = '80'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '<address>Apache/2.4.29 (Ubuntu) Server at db6.biwebdbtest.nhm.ku.edu Port 80</address>\n'
SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)'
apache.version = '(2, 4, 29)'
mod_wsgi.application_group = '172.17.0.2|'
mod_wsgi.callable_object = 'application'
mod_wsgi.daemon_connects = '1'
mod_wsgi.daemon_restarts = '0'
mod_wsgi.daemon_start = '1593074390577839'
mod_wsgi.enable_sendfile = '0'
mod_wsgi.handler_script = ''
mod_wsgi.ignore_activity = '0'
mod_wsgi.listener_host = ''
mod_wsgi.listener_port = '80'
mod_wsgi.path_info = '/api/specify/spappresourcedata/'
mod_wsgi.process_group = '$servername'
mod_wsgi.queue_start = '1593074390577555'
mod_wsgi.request_handler = 'wsgi-script'
mod_wsgi.request_id = 'p7AmiYSDDzg'
mod_wsgi.request_start = '1593074390577319'
mod_wsgi.script_name = ''
mod_wsgi.script_reloading = '1'
mod_wsgi.script_start = '1593074390577968'
mod_wsgi.thread_id = 2
mod_wsgi.thread_requests = 103
mod_wsgi.total_requests = 738
mod_wsgi.version = '(4, 5, 17)'
wsgi.errors = <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'>
wsgi.file_wrapper = ''
wsgi.input = <mod_wsgi.Input object at 0x7fc6035a4c70>
wsgi.multiprocess = False
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'

Settings:
Using settings module specifyweb.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = '()'
ADMIN_MEDIA_PREFIX = '/static/admin/'
ALLOWED_HOSTS = ['*']
ALLOW_SPECIFY6_PASSWORDS = '********************'
ALLOW_SUPPORT_LOGIN = False
ANONYMOUS_USER = None
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_LDAP_SERVER_URI = None
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'specify.Specifyuser'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'specifyweb.hibernateboolsbackend.backends.mysql', 'NAME': 'sp7demofish', 'USER': 'MasterUser', 'PASSWORD': '********************', 'HOST': '172.17.0.1', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None}}
DATABASE_HOST = '172.17.0.1'
DATABASE_NAME = 'sp7demofish'
DATABASE_PORT = ''
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
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']
DATE_FORMAT = 'N j, Y'
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 = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DEPOSITORY_DIR = '/home/specify/specify_depository'
DISABLE_AUDITING = False
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = "('django.contrib.sessions', 'django.contrib.staticfiles', 'django.contrib.contenttypes', 'django.contrib.auth', 'specifyweb.specify', 'specifyweb.stored_queries', 'specifyweb.businessrules', 'specifyweb.express_search', 'specifyweb.context', 'specifyweb.attachment_gw', 'specifyweb.frontend', 'specifyweb.barvis', 'specifyweb.report_runner', 'specifyweb.interactions', 'specifyweb.workbench', 'specifyweb.notifications', 'specifyweb.export', 'specifyweb.raven_placeholder')"
INTERNAL_IPS = []
JAVA_PATH = '/usr/bin/java'
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'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian 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'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('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 Bokmål'), ('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-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'console': {'level': 'DEBUG', 'class': 'logging.StreamHandler'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'DEBUG', 'propagate': True}, 'specify': {'handlers': ['console'], 'level': 'INFO', 'propagate': True}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = '()'
MASTER_NAME = 'MasterUser'
MASTER_PASSWORD = '********************'
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'specifyweb.context.middleware.ContextMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NOTIFICATION_TTL_DAYS = 7
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
RAVEN_CONFIG = None
REPORT_RUNNER_HOST = ''
REPORT_RUNNER_PORT = ''
ROOT_URLCONF = 'specifyweb.urls'
RO_MODE = False
SA_DATABASE_URL = 'mysql://MasterUser:MasterPassword@172.17.0.1:3306/sp7demofish?charset=utf8'
SA_POOL_RECYCLE = 3600
SCHEMA_LANGUAGE = 'en'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'specifyweb.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SPECIFY_CONFIG_DIR = '/opt/Specify/config'
SPECIFY_THICK_CLIENT = '/opt/Specify'
STATICFILES_DIRS = "(('config', '/opt/Specify/config'),)"
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = ''
STATIC_URL = '/static/'
STATS_URL = 'https://stats.specifycloud.org/capture'
SUPPORT_LOGIN_TTL = 300
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'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']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THICK_CLIENT_LOCATION = '/opt/Specify'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'America/Chicago'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = False
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
VERSION = 'v7.3.1-142-gc0dfc964(debug)'
WB_UPLOAD_LOG_DIR = '/var/cache/specify_wb_upload/'
WEB_ATTACHMENT_COLLECTION = None
WEB_ATTACHMENT_KEY = '********************'
WEB_ATTACHMENT_REQUIRES_KEY_FOR_GET = '********************'
WEB_ATTACHMENT_URL = None
WSGI_APPLICATION = None
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.

Happens for both labels present in that database: Screen Shot 2020-06-25 at 11 41 04 AM

Seems to happen for any CO

maxpatiiuk commented 4 years ago

I also get an exception for reports:

TypeError at /api/specify/spappresourcedata/
Object of type 'bytes' is not JSON serializable

Request Method: GET
Request URL: http://db6.biwebdbtest.nhm.ku.edu/api/specify/spappresourcedata/?domainfilter=false&spappresource=38&offset=0
Django Version: 2.2.10
Python Executable: /opt/specify7/ve/bin/python
Python Version: 3.6.9
Python Path: ['/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/opt/specify7/ve/lib/python3.6/site-packages', '/opt/specify7']
Server time: Thu, 25 Jun 2020 11:48:50 -0500
Installed Applications:
('django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'specifyweb.specify',
 'specifyweb.stored_queries',
 'specifyweb.businessrules',
 'specifyweb.express_search',
 'specifyweb.context',
 'specifyweb.attachment_gw',
 'specifyweb.frontend',
 'specifyweb.barvis',
 'specifyweb.report_runner',
 'specifyweb.interactions',
 'specifyweb.workbench',
 'specifyweb.notifications',
 'specifyweb.export',
 'specifyweb.raven_placeholder')
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'specifyweb.context.middleware.ContextMiddleware']

Traceback:

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/specify7/specifyweb/specify/views.py" in wrapped
  22.             return view(request, *args, **kwargs)

File "/opt/specify7/ve/lib/python3.6/site-packages/django/views/decorators/cache.py" in _cache_controlled
  31.             response = viewfunc(request, *args, **kw)

File "/opt/specify7/specifyweb/specify/views.py" in wrapped
  30.         return view(request, *args, **kwargs)

File "/opt/specify7/specifyweb/specify/views.py" in view
  44.             return dispatch_func(request, *args, **kwargs)

File "/opt/specify7/specifyweb/specify/api.py" in collection_dispatch
  170.         resp = HttpResponse(toJson(data), content_type='application/json')

File "/opt/specify7/specifyweb/specify/api.py" in toJson
  37.     return json.dumps(obj, cls=JsonEncoder)

File "/usr/lib/python3.6/json/__init__.py" in dumps
  238.         **kw).encode(obj)

File "/usr/lib/python3.6/json/encoder.py" in encode
  199.         chunks = self.iterencode(o, _one_shot=True)

File "/usr/lib/python3.6/json/encoder.py" in iterencode
  257.         return _iterencode(o, 0)

File "/opt/specify7/specifyweb/specify/api.py" in default
  34.         return json.JSONEncoder.default(self, obj)

File "/usr/lib/python3.6/json/encoder.py" in default
  180.                         o.__class__.__name__)

Exception Type: TypeError at /api/specify/spappresourcedata/
Exception Value: Object of type 'bytes' is not JSON serializable
Request information:
USER: Specifyuser object (1)

GET:
domainfilter = 'false'
spappresource = '38'
offset = '0'

POST: No POST data

FILES: No FILES data

COOKIES:
csrftoken = 'ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV'
1.sp-print-on-save.CollectionObject.generateLabelChk = 'false'
1.sp-print-on-save.Borrow.generateInvoice = 'true'
1.sp-print-on-save.Loan.generateInvoice = 'true'
1.sp-print-on-save.Gift.generateInvoice = 'true'
collection = '4'
sessionid = 'trvzya97v6tlvy2w44oj6vzdjbn85fjm'

META:
CONTEXT_DOCUMENT_ROOT = '/var/www/html'
CONTEXT_PREFIX = ''
CSRF_COOKIE = 'ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV'
DOCUMENT_ROOT = '/var/www/html'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTP_ACCEPT = 'application/json, text/javascript, */*; q=0.01'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_ACCEPT_LANGUAGE = 'en-us'
HTTP_CONNECTION = 'Keep-Alive'
HTTP_COOKIE = 'csrftoken=ksFRFI5MSczgfUCEa8HWz83sV6tR16gJhHIAfXHlsTRH37ndNK5rzR494sMNFHiV; 1.sp-print-on-save.CollectionObject.generateLabelChk=false; 1.sp-print-on-save.Borrow.generateInvoice=true; 1.sp-print-on-save.Loan.generateInvoice=true; 1.sp-print-on-save.Gift.generateInvoice=true; collection=4; sessionid=trvzya97v6tlvy2w44oj6vzdjbn85fjm'
HTTP_HOST = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_REFERER = 'http://db6.biwebdbtest.nhm.ku.edu/specify/query/55/'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15'
HTTP_X_FORWARDED_FOR = '10.125.131.69'
HTTP_X_FORWARDED_HOST = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_X_FORWARDED_SERVER = 'db6.biwebdbtest.nhm.ku.edu'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = '/api/specify/spappresourcedata/'
PATH_TRANSLATED = '/opt/specify7/specifyweb.wsgi/api/specify/spappresourcedata/'
QUERY_STRING = 'domainfilter=false&spappresource=38&offset=0'
REMOTE_ADDR = '172.17.0.1'
REMOTE_PORT = '58418'
REQUEST_METHOD = 'GET'
REQUEST_SCHEME = 'http'
REQUEST_URI = '/api/specify/spappresourcedata/?domainfilter=false&spappresource=38&offset=0'
SCRIPT_FILENAME = '/opt/specify7/specifyweb.wsgi'
SCRIPT_NAME = ''
SERVER_ADDR = '172.17.0.2'
SERVER_ADMIN = '[no address given]'
SERVER_NAME = 'db6.biwebdbtest.nhm.ku.edu'
SERVER_PORT = '80'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '<address>Apache/2.4.29 (Ubuntu) Server at db6.biwebdbtest.nhm.ku.edu Port 80</address>\n'
SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)'
apache.version = '(2, 4, 29)'
mod_wsgi.application_group = '172.17.0.2|'
mod_wsgi.callable_object = 'application'
mod_wsgi.daemon_connects = '1'
mod_wsgi.daemon_restarts = '0'
mod_wsgi.daemon_start = '1593085729817147'
mod_wsgi.enable_sendfile = '0'
mod_wsgi.handler_script = ''
mod_wsgi.ignore_activity = '0'
mod_wsgi.listener_host = ''
mod_wsgi.listener_port = '80'
mod_wsgi.path_info = '/api/specify/spappresourcedata/'
mod_wsgi.process_group = '$servername'
mod_wsgi.queue_start = '1593085729816882'
mod_wsgi.request_handler = 'wsgi-script'
mod_wsgi.request_id = 'S8AFLYeDDzg'
mod_wsgi.request_start = '1593085729816651'
mod_wsgi.script_name = ''
mod_wsgi.script_reloading = '1'
mod_wsgi.script_start = '1593085729817280'
mod_wsgi.thread_id = 7
mod_wsgi.thread_requests = 215
mod_wsgi.total_requests = 2293
mod_wsgi.version = '(4, 5, 17)'
wsgi.errors = <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'>
wsgi.file_wrapper = ''
wsgi.input = <mod_wsgi.Input object at 0x7fc60194d650>
wsgi.multiprocess = False
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'

Settings:
Using settings module specifyweb.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = '()'
ADMIN_MEDIA_PREFIX = '/static/admin/'
ALLOWED_HOSTS = ['*']
ALLOW_SPECIFY6_PASSWORDS = '********************'
ALLOW_SUPPORT_LOGIN = False
ANONYMOUS_USER = None
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_LDAP_SERVER_URI = None
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'specify.Specifyuser'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'specifyweb.hibernateboolsbackend.backends.mysql', 'NAME': 'sp7demofish', 'USER': 'MasterUser', 'PASSWORD': '********************', 'HOST': '172.17.0.1', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None}}
DATABASE_HOST = '172.17.0.1'
DATABASE_NAME = 'sp7demofish'
DATABASE_PORT = ''
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
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']
DATE_FORMAT = 'N j, Y'
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 = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DEPOSITORY_DIR = '/home/specify/specify_depository'
DISABLE_AUDITING = False
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = "('django.contrib.sessions', 'django.contrib.staticfiles', 'django.contrib.contenttypes', 'django.contrib.auth', 'specifyweb.specify', 'specifyweb.stored_queries', 'specifyweb.businessrules', 'specifyweb.express_search', 'specifyweb.context', 'specifyweb.attachment_gw', 'specifyweb.frontend', 'specifyweb.barvis', 'specifyweb.report_runner', 'specifyweb.interactions', 'specifyweb.workbench', 'specifyweb.notifications', 'specifyweb.export', 'specifyweb.raven_placeholder')"
INTERNAL_IPS = []
JAVA_PATH = '/usr/bin/java'
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'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian 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'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('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 Bokmål'), ('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-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'console': {'level': 'DEBUG', 'class': 'logging.StreamHandler'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'DEBUG', 'propagate': True}, 'specify': {'handlers': ['console'], 'level': 'INFO', 'propagate': True}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = '()'
MASTER_NAME = 'MasterUser'
MASTER_PASSWORD = '********************'
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'specifyweb.context.middleware.ContextMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NOTIFICATION_TTL_DAYS = 7
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
RAVEN_CONFIG = None
REPORT_RUNNER_HOST = ''
REPORT_RUNNER_PORT = ''
ROOT_URLCONF = 'specifyweb.urls'
RO_MODE = False
SA_DATABASE_URL = 'mysql://MasterUser:MasterPassword@172.17.0.1:3306/sp7demofish?charset=utf8'
SA_POOL_RECYCLE = 3600
SCHEMA_LANGUAGE = 'en'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'specifyweb.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SPECIFY_CONFIG_DIR = '/opt/Specify/config'
SPECIFY_THICK_CLIENT = '/opt/Specify'
STATICFILES_DIRS = "(('config', '/opt/Specify/config'),)"
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = ''
STATIC_URL = '/static/'
STATS_URL = 'https://stats.specifycloud.org/capture'
SUPPORT_LOGIN_TTL = 300
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'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']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THICK_CLIENT_LOCATION = '/opt/Specify'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'America/Chicago'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = False
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
VERSION = 'v7.3.1-142-gc0dfc964(debug)'
WB_UPLOAD_LOG_DIR = '/var/cache/specify_wb_upload/'
WEB_ATTACHMENT_COLLECTION = None
WEB_ATTACHMENT_KEY = '********************'
WEB_ATTACHMENT_REQUIRES_KEY_FOR_GET = '********************'
WEB_ATTACHMENT_URL = None
WSGI_APPLICATION = None
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.
maxpatiiuk commented 4 years ago

Seems to be different now

Screen Shot 2020-06-26 at 3 51 25 PM Screen Shot 2020-06-26 at 3 51 36 PM

Request Method: | POST
-- | --
http://db6.biwebdbtest.nhm.ku.edu/report_runner/run/
2.2.10
ReportException
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</h2> <p>Problem accessing /report. Reason: <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error opening input stream from URL: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=.   at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:116)     at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:45)  at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)    at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:190)    at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:206)   at net.sf.jasperreports.renderers.util.RendererUtil.getNonLazyRenderable(RendererUtil.java:145)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:534)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:478)  at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:311)   at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:121)    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)   at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983)     at edu.ku.brc.specify.reports.ReportServlet.doPost(ReportServlet.java:47)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)  at org.eclipse.jetty.server.Server.handle(Server.java:370)  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)   at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)     at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)     at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)     at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)  at java.base/java.lang.Thread.run(Thread.java:834) Caused by: net.sf.jasperreports.engine.JRException: Error opening input stream from URL: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=.  at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:343)  at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:99)  ... 45 more Caused by: java.io.FileNotFoundException: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=     at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1915)   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)  at java.base/java.net.URL.openStream(URL.java:1140)     at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:339)  ... 46 more </pre> <h3>Caused by:</h3><pre>net.sf.jasperreports.engine.JRException: Error opening input stream from URL: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=.     at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:343)  at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:99)  at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:45)  at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)    at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:190)    at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:206)   at net.sf.jasperreports.renderers.util.RendererUtil.getNonLazyRenderable(RendererUtil.java:145)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:534)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:478)  at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:311)   at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:121)    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)   at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983)     at edu.ku.brc.specify.reports.ReportServlet.doPost(ReportServlet.java:47)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)  at org.eclipse.jetty.server.Server.handle(Server.java:370)  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)   at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)     at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)     at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)     at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)  at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.io.FileNotFoundException: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=  at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1915)   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)  at java.base/java.net.URL.openStream(URL.java:1140)     at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:339)  ... 46 more </pre> <h3>Caused by:</h3><pre>java.io.FileNotFoundException: https://demo-assets.specifycloud.org/fileget?coll=KUFishvoucher&amp;type=O&amp;filename=a6daad6c-5091-4461-86ee-eeba9434ef2b.jpg&amp;downloadname=&amp;token=     at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1915)   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)  at java.base/java.net.URL.openStream(URL.java:1140)     at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:339)  at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:99)  at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:45)  at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)    at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:190)    at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:206)   at net.sf.jasperreports.renderers.util.RendererUtil.getNonLazyRenderable(RendererUtil.java:145)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:534)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:478)  at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381)    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500)    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:311)   at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115)  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)    at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:121)    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)   at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983)     at edu.ku.brc.specify.reports.ReportServlet.doPost(ReportServlet.java:47)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)  at org.eclipse.jetty.server.Server.handle(Server.java:370)  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)   at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)     at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)     at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)     at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)  at java.base/java.lang.Thread.run(Thread.java:834) </pre> <hr /><i><small>Powered by Jetty://</small></i><br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                 <br/>                                                  </body> </html>
/opt/specify7/specifyweb/report_runner/views.py in run, line 46
/opt/specify7/ve/bin/python
3.6.9
['/usr/lib/python36.zip',  '/usr/lib/python3.6',  '/usr/lib/python3.6/lib-dynload',  '/opt/specify7/ve/lib/python3.6/site-packages',  '/opt/specify7']
Fri, 26 Jun 2020 12:51:32 -0500
maxpatiiuk commented 4 years ago
Screen Shot 2020-06-26 at 3 59 02 PM
benanhalt commented 4 years ago

This is due to #695. I think it will work now.

maxpatiiuk commented 4 years ago

Reports and labels work fine now!