You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/05 08:20:59 UTC

[GitHub] [airflow] Pverheijen opened a new issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Pverheijen opened a new issue #14619:
URL: https://github.com/apache/airflow/issues/14619


   **Apache Airflow version**:
   2.0.1
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   $ kubectl version
   Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"windows/amd64"}
   Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.14", GitCommit:"5de7fd1f9555368a86eb0f8f664dc58055c17269", GitTreeState:"clean", BuildDate:"2021-01-18T09:31:01Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: Azure
   - **OS** (e.g. from /etc/os-release): Ubuntu
   
   **What happened**:
   
   <!-- (please include exact error messages if you can) -->
   ```python
   *** Reading local file: /usr/local/airflow/logs/example_python_operator/print_the_context/2021-03-05T08:13:15.999564+00:00/1.log
   [2021-03-05 08:13:27,887] {{taskinstance.py:851}} INFO - Dependencies all met for <TaskInstance: example_python_operator.print_the_context 2021-03-05T08:13:15.999564+00:00 [queued]>
   [2021-03-05 08:13:28,826] {{taskinstance.py:851}} INFO - Dependencies all met for <TaskInstance: example_python_operator.print_the_context 2021-03-05T08:13:15.999564+00:00 [queued]>
   [2021-03-05 08:13:28,826] {{taskinstance.py:1042}} INFO - 
   --------------------------------------------------------------------------------
   [2021-03-05 08:13:28,826] {{taskinstance.py:1043}} INFO - Starting attempt 1 of 1
   [2021-03-05 08:13:28,826] {{taskinstance.py:1044}} INFO - 
   --------------------------------------------------------------------------------
   [2021-03-05 08:13:28,959] {{taskinstance.py:1063}} INFO - Executing <Task(PythonOperator): print_the_context> on 2021-03-05T08:13:15.999564+00:00
   [2021-03-05 08:13:28,963] {{standard_task_runner.py:52}} INFO - Started process 9 to run task
   [2021-03-05 08:13:28,970] {{standard_task_runner.py:76}} INFO - Running: ['airflow', 'tasks', 'run', 'example_python_operator', 'print_the_context', '2021-03-05T08:13:15.999564+00:00', '--job-id', '161', '--pool', 'default_pool', '--raw', '--subdir', '/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/example_dags/example_python_operator.py', '--cfg-path', '/tmp/tmpngxwms4a', '--error-file', '/tmp/tmps6vts_c4']
   [2021-03-05 08:13:28,971] {{standard_task_runner.py:77}} INFO - Job 161: Subtask print_the_context
   [2021-03-05 08:13:31,673] {{logging_mixin.py:104}} INFO - Running <TaskInstance: example_python_operator.print_the_context 2021-03-05T08:13:15.999564+00:00 [running]> on host examplepythonoperatorprintthecontext.f417e2db12ef4ffe91903b643a
   [2021-03-05 08:13:33,398] {{taskinstance.py:1455}} ERROR - Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
   Traceback (most recent call last):
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1112, in _run_raw_task
       self._prepare_and_execute_task_with_callbacks(context, task)
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1250, in _prepare_and_execute_task_with_callbacks
       RenderedTaskInstanceFields.write(RenderedTaskInstanceFields(ti=self, render_templates=False))
     File "<string>", line 4, in __init__
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 433, in _initialize_instance
       manager.dispatch.init_failure(self, args, kwargs)
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
       with_traceback=exc_tb,
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 430, in _initialize_instance
       return manager.original_init(*mixed[1:], **kwargs)
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/models/renderedtifields.py", line 55, in __init__
       self.k8s_pod_yaml = ti.render_k8s_pod_yaml()
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1754, in render_k8s_pod_yaml
       kube_config = KubeConfig()
     File "/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/kubernetes/kube_config.py", line 64, in __init__
       self.kube_client_request_args = json.loads(kube_client_request_args)
     File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
       obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
       obj, end = self.scan_once(s, idx)
   json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
   [2021-03-05 08:13:33,400] {{taskinstance.py:1503}} INFO - Marking task as FAILED. dag_id=example_python_operator, task_id=print_the_context, execution_date=20210305T081315, start_date=20210305T081327, end_date=20210305T081333
   [2021-03-05 08:13:37,488] {{local_task_job.py:146}} INFO - Task exited with return code 1
   ```
   
   **What you expected to happen**:
   Pod to run
   
   <!-- What do you think went wrong? -->
   Not the kube_client_request_args, tried that with escaping the " 
   
   How often does this problem occur? Once? Every time etc?
   Every time
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-848361472


   This issue has been closed because it has not received response from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-813121743


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Pverheijen commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
Pverheijen commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-791547020


   Hey @ashb, thank you for the quick reply. My apologies for not adding all required information I incorrectly presumed it would be helpful. 
   
   The DAG that caused the error was the example_python_operator from the docs (https://airflow.apache.org/docs/apache-airflow/1.10.4/_modules/airflow/example_dags/example_python_operator.html).
   
   Different DAG such as the new API (https://airflow.apache.org/docs/apache-airflow/stable/tutorial_taskflow_api.html) also gave the same error unfortunately.
   
   For completeness sake:
   
   My starting point was a helm chart that used the Puckel image for Airflow with some annotations.
   
   I've got another dag that gave an error that it the worker pod didn't have access to the logs. 
   And the example_python_operator DAG used to work on the older version of Airflow that I was running (1.10.3).
   
   Not sure if it's related but here's the error:
   ```
   *** Trying to get logs (last 100 lines) from worker pod  ***
   
   *** Unable to fetch logs from worker pod  ***
   (400)
   Reason: Bad Request
   HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Tue, 20 Oct 2020 16:29:32 GMT', 'Content-Length': '136'})
   HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"name must be provided","reason":"BadRequest","code":400}\n'
   ```
   
   Role yaml specification:
   ```
   {{ if .Values.rbac.create }}
   apiVersion: rbac.authorization.k8s.io/v1
   kind: Role
   metadata:
     name: {{ template "airflow.fullname" . }}
     labels:
       app: {{ template "airflow.name" . }}
       chart: {{ template "airflow.chart" . }}
       release: {{ .Release.Name }}
       heritage: {{ .Release.Service }}
   rules:
     - apiGroups:
         - ""
       resources:
         - "pods/log"
       verbs:
         - "get"
         - "list"
     - apiGroups:
         - ""
       resources:
         - "pods"
       verbs:
         - "create"
         - "list"
         - "get"
         - "patch"
         - "watch"
         - "delete"
     - apiGroups:
         - ""
       resources:
         - "pods/exec"
       verbs:
         - "create"
         - "get"
     - apiGroups:
         - ""
       resources:
         - "events"
       verbs:
         - "list"
   {{ end }}
   ```
   
   RoleBinding yaml specification:
   ```
   {{ if .Values.rbac.create }}
   apiVersion: rbac.authorization.k8s.io/v1
   kind: RoleBinding
   metadata:
     name: {{ template "airflow.fullname" . }}
     labels:
       app: {{ template "airflow.name" . }}
       chart: {{ template "airflow.chart" . }}
       release: {{ .Release.Name }}
       heritage: {{ .Release.Service }}
   roleRef:
     apiGroup: rbac.authorization.k8s.io
     kind: Role
     name: {{ template "airflow.fullname" . }}
   subjects:
   - kind: ServiceAccount
     name: {{ template "airflow.serviceAccountName" . }}
     namespace: {{ .Release.Namespace }}
   {{ end }}
   ```
   
   I based the specifications on https://github.com/apache/airflow/issues/11696 
   Different formatting that I hope isn't the problem but if it is, please let me know :-). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-791248622


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-813699611


   > Not the kube_client_request_args, tried that with escaping the "
   
   Can you try without anything for `kube_client_request_args`, e.g:
   
   ```
   kube_client_request_args =
   ```
   
   Also, what do you have it set to?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-841563759


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] closed issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #14619:
URL: https://github.com/apache/airflow/issues/14619


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-791522193


   You'll need to share your DAG/task definition with us to debug this please.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org