Skip to content

Instantly share code, notes, and snippets.

@sergiomario
Last active January 8, 2020 18:18
Show Gist options
  • Save sergiomario/5da4783da23c38df5267e13f691a3f41 to your computer and use it in GitHub Desktop.
Save sergiomario/5da4783da23c38df5267e13f691a3f41 to your computer and use it in GitHub Desktop.
TASK [run jarbas to update data from the chamber of deputies] *****************************************************************************************************************************************************
fatal: FAILED! => {
"ansible_job_id": "385567928732.25195",
"changed": true,
"cmd": "python3 manage.py update /tmp/serenata-data",
"delta": "0:00:01.669690",
"end": "2020-01-08 00:23:42.234768",
"finished": 1,
"invocation": {
"module_args": {
"_raw_params": "python3 manage.py update /tmp/serenata-data",
"_uses_shell": true,
"argv": null,
"chdir": "/opt/serenata-de-amor/",
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2020-01-08 00:23:40.565078",
"stderr": "Traceback (most recent call last):\n File \"manage.py\", line 22, in <module>\n execute_from_command_line(sys.argv)\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line\n utility.execute()\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 375, in execute\n self.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 316, in run_from_argv\n self.execute(*args, **cmd_options)\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 353, in execute\n output = self.handle(*args, **options)\n File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/update.py\", line 47, in handle\n call_command('reimbursements', file, drop_all=first_round)\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 148, in call_command\n return command.execute(*args, **defaults)\n File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 353, in execute\n output = self.handle(*args, **options)\n File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 28, in handle\n self.create_batches()\n File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 40, in create_batches\n for count, reimbursement in enumerate(self.reimbursements, 1):\n File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 35, in reimbursements\n obj = serialize(row)\n File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/tasks.py\", line 48, in serialize\n return Reimbursement(**row)\n File \"/usr/local/lib/python3.6/dist-packages/django/db/models/base.py\", line 485, in __init__\n raise TypeError(\"'%s' is an invalid keyword argument for this function\" % kwarg)\nTypeError: 'cpf' is an invalid keyword argument for this function",
"stderr_lines": [
"Traceback (most recent call last):",
" File \"manage.py\", line 22, in <module>",
" execute_from_command_line(sys.argv)",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line",
" utility.execute()",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 375, in execute",
" self.fetch_command(subcommand).run_from_argv(self.argv)",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 316, in run_from_argv",
" self.execute(*args, **cmd_options)",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 353, in execute",
" output = self.handle(*args, **options)",
" File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/update.py\", line 47, in handle",
" call_command('reimbursements', file, drop_all=first_round)",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py\", line 148, in call_command",
" return command.execute(*args, **defaults)",
" File \"/usr/local/lib/python3.6/dist-packages/django/core/management/base.py\", line 353, in execute",
" output = self.handle(*args, **options)",
" File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 28, in handle",
" self.create_batches()",
" File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 40, in create_batches",
" for count, reimbursement in enumerate(self.reimbursements, 1):",
" File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/management/commands/reimbursements.py\", line 35, in reimbursements",
" obj = serialize(row)",
" File \"/opt/serenata-de-amor/jarbas/chamber_of_deputies/tasks.py\", line 48, in serialize",
" return Reimbursement(**row)",
" File \"/usr/local/lib/python3.6/dist-packages/django/db/models/base.py\", line 485, in __init__",
" raise TypeError(\"'%s' is an invalid keyword argument for this function\" % kwarg)",
"TypeError: 'cpf' is an invalid keyword argument for this function"
],
"stdout": "Backing up 0 tweets\nImporting /tmp/serenata-data/reimbursements-2009.csv",
"stdout_lines": [
"Backing up 0 tweets",
"Importing /tmp/serenata-data/reimbursements-2009.csv"
]
}
to retry, use: --limit @/root/serenata-de-amor/contrib/update/update.retry
PLAY RECAP ********************************************************************************************************************************************************************************************************
ok=8 changed=2 unreachable=0 failed=1
localhost : ok=5 changed=1 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment