Uploaded image for project: 'Superdesk'
  1. Superdesk
  2. SD-3996

Running app:prepopulate command fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0.5
    • Sprint:
      AAP Prod Candidate Backlog, Team EUR AAP Release 5, EUR AAP Release Version 0.3, EUR Superdesk Beta 2

      Description

      Python version: 3.5.1
      elasticsearch: stable 2.2.0
      mongodb: stable 3.2.1
      kibana: stable 4.4.0
      logstash: stable 2.2.0
      OS: OSX

      I'm getting the following error when trying to run app:prepopulate command(superdesk master branch):

      (env)rafal@MacBook-Pro-Rafa ~/Documents/Projects/superdesk/server (master)*$ python3 manage.py app:prepopulate
      abstract_populator
      currency
      currency_base
      currency_usd_to_cad
      dollar_AUD_character_replace
      dpa_derive_dateline
      noise11_derive_metadata
      reuters_derive_dateline
      take_key_validator
      update_to_pass_validation
      Raven is not configured (logging is disabled). Please see the documentation for more information.
      pushing event activity ({"_dest": []})
      pushing event activity ({"_dest": []})
      pushing event activity ({"_dest": []})
      pushing event activity ({"_dest": []})
      pushing event activity ({"_dest": []})
      pushing event activity ({"_dest": []})
      pushing event stage ({"desk_id": "None", "stage_id": "56b4ae46b7cb18e7f3747418", "updated": 1})
      pushing event stage ({"desk_id": "None", "stage_id": "56b4ae46b7cb18e7f3747419", "updated": 1})
      pushing event desk ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741a"})
      pushing event stage ({"desk_id": "None", "stage_id": "56b4ae46b7cb18e7f374741b", "updated": 1})
      pushing event stage ({"desk_id": "None", "stage_id": "56b4ae46b7cb18e7f374741c", "updated": 1})
      pushing event desk ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741d"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741a", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f374741e"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741a", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f374741f"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741a", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f3747420"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741d", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f3747421"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741d", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f3747422"})
      pushing event stage ({"created": 1, "desk_id": "56b4ae46b7cb18e7f374741d", "is_visible": true, "stage_id": "56b4ae46b7cb18e7f3747423"})
      PUT /superdesk/archive/item1 [status:400 request:0.079s]
      Uhoh, an exception occured while running the command...
      TransportError(400, 'illegal_argument_exception')
      Traceback (most recent call last):
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/superdesk/__init__.py", line 56, in __call__
          res = self.run(*args, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/apps/prepopulate/app_prepopulate.py", line 174, in run
          prepopulate_data(prepopulate_file, get_default_user())
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/apps/prepopulate/app_prepopulate.py", line 80, in prepopulate_data
          ids = service.post([data])
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/superdesk/services.py", line 110, in post
          ids = self.create(docs, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/superdesk/services.py", line 63, in create
          ids = self.backend.create(self.datasource, docs, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/superdesk/eve_backend.py", line 80, in create
          self.create_in_search(endpoint_name, docs, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/superdesk/eve_backend.py", line 95, in create_in_search
          search_backend.insert(endpoint_name, docs, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/eve_elastic/elastic.py", line 365, in insert
          res = self.es.index(body=doc, id=doc.get('_id'), **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
          return func(*args, params=params, **kwargs)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 263, in index
          _make_path(index, doc_type, id), params=params, body=body)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/elasticsearch/transport.py", line 307, in perform_request
          status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 93, in perform_request
          self._raise_error(response.status, raw_data)
        File "/Users/rafal/Documents/Projects/superdesk/server/env/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 105, in _raise_error
          raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
      elasticsearch.exceptions.RequestError: TransportError(400, 'illegal_argument_exception')
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                goffi Jérôme Poisson
                Reporter:
                rafmus90 Rafał Muszyński
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support

                    Potential Duplicates

                      Git Integration