When the script 'deploy.sh' runs to this line
python $DIR/manage.py load_global_custom_config --file $DIR/anatomy/proso_custom_config.yaml
the following error is indicated.
Traceback (most recent call last): File "/home/tasse/desktop/cs/anatomy/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_common/management/commands/load_global_custom_config.py", line 34, in handle condition_value=record['condition_value'] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_common/models.py", line 304, in try_create config=config File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/manager.py", line 122, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/query.py", line 401, in create obj.save(force_insert=True, using=self.db) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/base.py", line 700, in save force_update=force_update, update_fields=update_fields) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/base.py", line 724, in save_base update_fields=update_fields) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 192, in send response = receiver(signal=self, sender=sender, **named) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 1685, in process_parent_for_custom_filter instance.condition_value = Item.objects.translate_identifiers([identifier], language=language)[identifier] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in translate_identifiers for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in group_by return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in <dictcomp> return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in <lambda> for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 933, in get_item_type_id_from_identifier raise Exception('There is no item type for name "{}".'.format(identifier_type)) Exception: There is no item type for name "category".
And the silimar error occurs when I open the test server to access the page . 'http://127.0.0.1:8000/practice/'
Internal Server Error: /models/practice/ Traceback (most recent call last): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view response = view_func(request, *args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/lazysignup/decorators.py", line 47, in wrapped return func(request, *args, **kwargs) File "/usr/lib/python3.5/contextlib.py", line 30, in inner return func(*args, **kwds) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/views.py", line 411, in practice item_ids = Item.objects.filter_all_reachable_leaves(practice_filter, get_language(request), forbidden_identifiers=get_forbidden_items()) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 785, in filter_all_reachable_leaves return self.filter_all_reachable_leaves_many([identifier_filter], language, forbidden_identifiers=forbidden_identifiers)[0] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/django/cache.py", line 64, in wrapper value = func(*args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 714, in filter_all_reachable_leaves_many translated = self.translate_identifiers(item_identifiers, language) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in translate_identifiers for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in group_by return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in <dictcomp> return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in <lambda> for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 933, in get_item_type_id_from_identifier raise Exception('There is no item type for name "{}".'.format(identifier_type)) Exception: There is no item type for name "category". [2017-07-10 05:29:59,413] DEBUG "total number of 17 queries took 0.03900000000000001 seconds" [10/Jul/2017 05:29:59] "GET /models/practice/?avoid=%5B%5D&filter=%5B%5B%22category%2Fimages%22%5D%5D&language=en&limit=2&without_contexts=1 HTTP/1.1" 500 145605
When the script 'deploy.sh' runs to this line
python $DIR/manage.py load_global_custom_config --file $DIR/anatomy/proso_custom_config.yaml
the following error is indicated.Traceback (most recent call last): File "/home/tasse/desktop/cs/anatomy/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_common/management/commands/load_global_custom_config.py", line 34, in handle condition_value=record['condition_value'] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_common/models.py", line 304, in try_create config=config File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/manager.py", line 122, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/query.py", line 401, in create obj.save(force_insert=True, using=self.db) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/base.py", line 700, in save force_update=force_update, update_fields=update_fields) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/db/models/base.py", line 724, in save_base update_fields=update_fields) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 192, in send response = receiver(signal=self, sender=sender, **named) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 1685, in process_parent_for_custom_filter instance.condition_value = Item.objects.translate_identifiers([identifier], language=language)[identifier] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in translate_identifiers for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in group_by return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in <dictcomp> return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in <lambda> for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 933, in get_item_type_id_from_identifier raise Exception('There is no item type for name "{}".'.format(identifier_type)) Exception: There is no item type for name "category".
And the silimar error occurs when I open the test server to access the page . 'http://127.0.0.1:8000/practice/'
Internal Server Error: /models/practice/ Traceback (most recent call last): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/django/utils/decorators.py", line 149, in _wrapped_view response = view_func(request, *args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/lazysignup/decorators.py", line 47, in wrapped return func(request, *args, **kwargs) File "/usr/lib/python3.5/contextlib.py", line 30, in inner return func(*args, **kwds) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/views.py", line 411, in practice item_ids = Item.objects.filter_all_reachable_leaves(practice_filter, get_language(request), forbidden_identifiers=get_forbidden_items()) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 785, in filter_all_reachable_leaves return self.filter_all_reachable_leaves_many([identifier_filter], language, forbidden_identifiers=forbidden_identifiers)[0] File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/django/cache.py", line 64, in wrapper value = func(*args, **kwargs) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 714, in filter_all_reachable_leaves_many translated = self.translate_identifiers(item_identifiers, language) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/time.py", line 35, in timed result = function(*args, **kw) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in translate_identifiers for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in group_by return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso/list.py", line 46, in <dictcomp> return proso.dict.group_keys_by_values({x: by(x) for x in what}) File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 889, in <lambda> for item_type_id, type_identifiers in proso.list.group_by(identifiers, by=lambda identifier: self.get_item_type_id_from_identifier(identifier, item_types)).items(): File "/home/tasse/venv/anatomy/lib/python3.5/site-packages/proso_models/models.py", line 933, in get_item_type_id_from_identifier raise Exception('There is no item type for name "{}".'.format(identifier_type)) Exception: There is no item type for name "category". [2017-07-10 05:29:59,413] DEBUG "total number of 17 queries took 0.03900000000000001 seconds" [10/Jul/2017 05:29:59] "GET /models/practice/?avoid=%5B%5D&filter=%5B%5B%22category%2Fimages%22%5D%5D&language=en&limit=2&without_contexts=1 HTTP/1.1" 500 145605