[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729502#comment-17729502 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit 538745201bd07a88ae3696aa59fa6d8ae4e81ceb in airavata's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata.git;h=538745201b ] Merge branch 'AIRAVATA-3697' into develop > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >return self.dispatch(request, *args,
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729501#comment-17729501 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit f4cc483734c6f9c674c26e5f6b9627c4d7e9fc96 in airavata's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata.git;h=f4cc483734 ] AIRAVATA-3697 Set lang and locale on WSGIDaemonProcess This is so that the Django portal code can handle filenames with UTF8 characters. > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File >
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729504#comment-17729504 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit 8bf8ee00691c016d7357aba094fd43b093aebfe0 in airavata's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata.git;h=8bf8ee0069 ] Merge branch 'AIRAVATA-3697' into develop > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >return self.dispatch(request, *args,
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729503#comment-17729503 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit 33300327fc98d34ba5a62dbe75aea2678120a065 in airavata's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata.git;h=33300327fc ] AIRAVATA-3697 Db migrations and changing PRODUCT_NAME, REPLICA_NAME to clobs > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >return
[jira] [Commented] (AIRAVATA-3696) Defer instantiating output view providers until after Django apps are ready
[ https://issues.apache.org/jira/browse/AIRAVATA-3696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729494#comment-17729494 ] ASF subversion and git services commented on AIRAVATA-3696: --- Commit eef9d7e5bbc781291e5dc21ce5f683b17517b436 in airavata-django-portal's branch refs/heads/staging from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=eef9d7e5 ] AIRAVATA-3696 removing unused import > Defer instantiating output view providers until after Django apps are ready > --- > > Key: AIRAVATA-3696 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3696 > Project: Airavata > Issue Type: Bug > Components: Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > > Currently in settings.py all output view providers are instantiated. However, > they might import code that transitively imports Django models which is not > allowed in Django until all apps have been loaded (see > https://docs.djangoproject.com/en/3.2/ref/applications/#initialization-process). > A better approach would be to instantiate the output view providers in the > ApiConfig.ready(). > {code} > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/settings.py", > line 644, in > OUTPUT_VIEW_PROVIDERS[entry_point.name] = entry_point.load()() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2517, in load > return self.resolve() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2523, in resolve > module = __import__(self.module_name, fromlist=['__name__'], level=0) > File > "/Users/machrist/Airavata/django/regsnp-django-app/regsnp_django_app/output_views.py", > line 32, in > from airavata_django_portal_sdk import urls > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/urls.py", > line 6, in > from . import views > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/views.py", > line 16, in > from rest_framework.decorators import api_view > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/decorators.py", > line 13, in > from rest_framework.views import APIView > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/views.py", > line 17, in > from rest_framework.schemas import DefaultSchema > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/schemas/__init__.py", > line 33, in > authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES, > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 225, in __getattr__ > val = perform_import(val, attr) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in perform_import > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 177, in import_from_string > return import_string(val) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/django/utils/module_loading.py", > line 17, in import_string > module = import_module(module_path) > File > "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", > line 126, in import_module > return _bootstrap._gcd_import(name[level:], package, level) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/api/authentication.py", > line 6, in > from django_airavata.apps.auth import utils > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/utils.py", > line 14, in > from . import models > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/models.py", > line 17, in > class EmailVerification(models.Model): > File >
[jira] [Commented] (AIRAVATA-3696) Defer instantiating output view providers until after Django apps are ready
[ https://issues.apache.org/jira/browse/AIRAVATA-3696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729493#comment-17729493 ] ASF subversion and git services commented on AIRAVATA-3696: --- Commit 1bebb7eb5253de3a1cedb57372380ceb98eb8d1b in airavata-django-portal's branch refs/heads/staging from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=1bebb7eb ] AIRAVATA-3696 instantiate output view providers in ready() > Defer instantiating output view providers until after Django apps are ready > --- > > Key: AIRAVATA-3696 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3696 > Project: Airavata > Issue Type: Bug > Components: Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > > Currently in settings.py all output view providers are instantiated. However, > they might import code that transitively imports Django models which is not > allowed in Django until all apps have been loaded (see > https://docs.djangoproject.com/en/3.2/ref/applications/#initialization-process). > A better approach would be to instantiate the output view providers in the > ApiConfig.ready(). > {code} > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/settings.py", > line 644, in > OUTPUT_VIEW_PROVIDERS[entry_point.name] = entry_point.load()() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2517, in load > return self.resolve() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2523, in resolve > module = __import__(self.module_name, fromlist=['__name__'], level=0) > File > "/Users/machrist/Airavata/django/regsnp-django-app/regsnp_django_app/output_views.py", > line 32, in > from airavata_django_portal_sdk import urls > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/urls.py", > line 6, in > from . import views > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/views.py", > line 16, in > from rest_framework.decorators import api_view > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/decorators.py", > line 13, in > from rest_framework.views import APIView > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/views.py", > line 17, in > from rest_framework.schemas import DefaultSchema > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/schemas/__init__.py", > line 33, in > authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES, > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 225, in __getattr__ > val = perform_import(val, attr) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in perform_import > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 177, in import_from_string > return import_string(val) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/django/utils/module_loading.py", > line 17, in import_string > module = import_module(module_path) > File > "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", > line 126, in import_module > return _bootstrap._gcd_import(name[level:], package, level) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/api/authentication.py", > line 6, in > from django_airavata.apps.auth import utils > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/utils.py", > line 14, in > from . import models > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/models.py", > line 17, in > class EmailVerification(models.Model): > File >
[jira] [Commented] (AIRAVATA-3696) Defer instantiating output view providers until after Django apps are ready
[ https://issues.apache.org/jira/browse/AIRAVATA-3696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729498#comment-17729498 ] ASF subversion and git services commented on AIRAVATA-3696: --- Commit eef9d7e5bbc781291e5dc21ce5f683b17517b436 in airavata-django-portal's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=eef9d7e5 ] AIRAVATA-3696 removing unused import > Defer instantiating output view providers until after Django apps are ready > --- > > Key: AIRAVATA-3696 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3696 > Project: Airavata > Issue Type: Bug > Components: Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > > Currently in settings.py all output view providers are instantiated. However, > they might import code that transitively imports Django models which is not > allowed in Django until all apps have been loaded (see > https://docs.djangoproject.com/en/3.2/ref/applications/#initialization-process). > A better approach would be to instantiate the output view providers in the > ApiConfig.ready(). > {code} > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/settings.py", > line 644, in > OUTPUT_VIEW_PROVIDERS[entry_point.name] = entry_point.load()() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2517, in load > return self.resolve() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2523, in resolve > module = __import__(self.module_name, fromlist=['__name__'], level=0) > File > "/Users/machrist/Airavata/django/regsnp-django-app/regsnp_django_app/output_views.py", > line 32, in > from airavata_django_portal_sdk import urls > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/urls.py", > line 6, in > from . import views > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/views.py", > line 16, in > from rest_framework.decorators import api_view > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/decorators.py", > line 13, in > from rest_framework.views import APIView > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/views.py", > line 17, in > from rest_framework.schemas import DefaultSchema > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/schemas/__init__.py", > line 33, in > authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES, > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 225, in __getattr__ > val = perform_import(val, attr) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in perform_import > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 177, in import_from_string > return import_string(val) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/django/utils/module_loading.py", > line 17, in import_string > module = import_module(module_path) > File > "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", > line 126, in import_module > return _bootstrap._gcd_import(name[level:], package, level) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/api/authentication.py", > line 6, in > from django_airavata.apps.auth import utils > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/utils.py", > line 14, in > from . import models > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/models.py", > line 17, in > class EmailVerification(models.Model): > File >
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729500#comment-17729500 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit a64264c10391df4bddeaa8663e18c3e508382dfc in airavata-django-portal's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=a64264c1 ] AIRAVATA-3697 fix download of utf8 filename > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >return
[jira] [Commented] (AIRAVATA-3696) Defer instantiating output view providers until after Django apps are ready
[ https://issues.apache.org/jira/browse/AIRAVATA-3696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729497#comment-17729497 ] ASF subversion and git services commented on AIRAVATA-3696: --- Commit 1bebb7eb5253de3a1cedb57372380ceb98eb8d1b in airavata-django-portal's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=1bebb7eb ] AIRAVATA-3696 instantiate output view providers in ready() > Defer instantiating output view providers until after Django apps are ready > --- > > Key: AIRAVATA-3696 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3696 > Project: Airavata > Issue Type: Bug > Components: Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > > Currently in settings.py all output view providers are instantiated. However, > they might import code that transitively imports Django models which is not > allowed in Django until all apps have been loaded (see > https://docs.djangoproject.com/en/3.2/ref/applications/#initialization-process). > A better approach would be to instantiate the output view providers in the > ApiConfig.ready(). > {code} > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/settings.py", > line 644, in > OUTPUT_VIEW_PROVIDERS[entry_point.name] = entry_point.load()() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2517, in load > return self.resolve() > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", > line 2523, in resolve > module = __import__(self.module_name, fromlist=['__name__'], level=0) > File > "/Users/machrist/Airavata/django/regsnp-django-app/regsnp_django_app/output_views.py", > line 32, in > from airavata_django_portal_sdk import urls > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/urls.py", > line 6, in > from . import views > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/airavata_django_portal_sdk/views.py", > line 16, in > from rest_framework.decorators import api_view > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/decorators.py", > line 13, in > from rest_framework.views import APIView > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/views.py", > line 17, in > from rest_framework.schemas import DefaultSchema > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/schemas/__init__.py", > line 33, in > authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES, > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 225, in __getattr__ > val = perform_import(val, attr) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in perform_import > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 168, in > return [import_from_string(item, setting_name) for item in val] > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/rest_framework/settings.py", > line 177, in import_from_string > return import_string(val) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/venv/lib/python3.10/site-packages/django/utils/module_loading.py", > line 17, in import_string > module = import_module(module_path) > File > "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", > line 126, in import_module > return _bootstrap._gcd_import(name[level:], package, level) > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/api/authentication.py", > line 6, in > from django_airavata.apps.auth import utils > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/utils.py", > line 14, in > from . import models > File > "/Users/machrist/Airavata/django/django_airavata_gateway/django_airavata/apps/auth/models.py", > line 17, in > class EmailVerification(models.Model): > File >
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729496#comment-17729496 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit a64264c10391df4bddeaa8663e18c3e508382dfc in airavata-django-portal's branch refs/heads/staging from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=a64264c1 ] AIRAVATA-3697 fix download of utf8 filename > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >return
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729495#comment-17729495 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit f29a74da5994561f6bec89df39db6a72f54128ab in airavata-django-portal's branch refs/heads/staging from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=f29a74da ] AIRAVATA-3697 log error if filesystemencoding isn't 'utf-8' > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >
[jira] [Commented] (AIRAVATA-3697) Handle unicode characters in file names
[ https://issues.apache.org/jira/browse/AIRAVATA-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17729499#comment-17729499 ] ASF subversion and git services commented on AIRAVATA-3697: --- Commit f29a74da5994561f6bec89df39db6a72f54128ab in airavata-django-portal's branch refs/heads/master from Marcus Christie [ https://gitbox.apache.org/repos/asf?p=airavata-django-portal.git;h=f29a74da ] AIRAVATA-3697 log error if filesystemencoding isn't 'utf-8' > Handle unicode characters in file names > --- > > Key: AIRAVATA-3697 > URL: https://issues.apache.org/jira/browse/AIRAVATA-3697 > Project: Airavata > Issue Type: Bug > Components: Airavata API, Django Portal >Reporter: Marcus Christie >Assignee: Marcus Christie >Priority: Major > Attachments: Photophysical properties and photodegradation mechanism > of 2-(2′-furanyl)-1H-benzimidazole (Fuberidazole) - ScienceDirect.html > > > Getting the following Django error when browsing experiment output files with > unicode characters in the file names: > {code} > Traceback (most recent call last): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/rest_framework/views.py", > line 506, in dispatch >response = handler(request, *args, **kwargs) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1467, in get >return self._create_response(request, experiment_id, path) > File > "/var/www/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/views.py", > line 1471, in _create_response >directories, files = user_storage.list_experiment_dir(request, > experiment_id, path) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 629, in list_experiment_dir >backend=backend, owner=experiment.userName) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/airavata_django_portal_sdk/user_storage/api.py", > line 760, in _get_data_product_uri >if user_file.exists(): > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/query.py", > line 808, in exists >return self.query.has_results(using=self.db) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/query.py", > line 561, in has_results >return compiler.has_results() > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1145, in has_results >return bool(self.execute_sql(SINGLE)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", > line 1175, in execute_sql >cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 66, in execute >return self._execute_with_wrappers(sql, params, many=False, > executor=self._execute) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 75, in _execute_with_wrappers >return executor(sql, params, many, context) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/utils.py", > line 84, in _execute >return self.cursor.execute(sql, params) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/db/backends/mysql/base.py", > line 73, in execute >return self.cursor.execute(query, args) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/cursors.py", > line 199, in execute >args = tuple(map(db.literal, args)) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/MySQLdb/connections.py", > line 280, in literal >s = self.string_literal(o.encode(self.encoding)) > During handling of the above exception ('utf-8' codec can't encode characters > in position 197-199: surrogates not allowed), another exception occurred: > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", > line 47, in inner >response = get_response(request) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", > line 181, in _get_response >response = wrapped_callback(request, *callback_args, **callback_kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", > line 54, in wrapped_view >return view_func(*args, **kwargs) > File > "/var/www/portals/django-seagrid/venv/lib64/python3.6/site-packages/django/views/generic/base.py", > line 70, in view >