match-gabeflores opened a new issue #17612:
URL: https://github.com/apache/airflow/issues/17612


   **Apache Airflow version**:
   Airflow 2.1.2
   Postgres 13
   Python 3.9.6
   
   Trying to set up a fresh instance of Airflow and getting the below error. 
Main error here:
   
   ```
   sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) 
function json_extract_path(json, unknown, unknown) does not exist
   LINE 1: ...T serialized_dag.dag_id AS serialized_dag_dag_id, json_extra...
                                                                ^
   HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
   ```
   
   **Full error below**
   
   ```
   
   Something bad has happened.
   Please consider letting us know by creating a bug report using GitHub.
   
   Python version: 3.9.6
   Airflow version: 2.1.2
   Node: ue12-rgzu67l
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1276, in _execute_context
       self.dialect.do_execute(
     File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 
608, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.errors.UndefinedFunction: function json_extract_path(json, unknown, 
unknown) does not exist
   LINE 1: ...T serialized_dag.dag_id AS serialized_dag_dag_id, json_extra...
                                                                ^
   HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
   
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in 
wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in 
full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in 
handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, 
in reraise
       raise value
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in 
full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in 
dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.9/site-packages/airflow/www/auth.py", line 
34, in decorated
       return func(*args, **kwargs)
     File "/usr/local/lib/python3.9/site-packages/airflow/www/decorators.py", 
line 97, in view_func
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.9/site-packages/airflow/www/decorators.py", 
line 60, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.9/site-packages/airflow/www/views.py", line 
3991, in list
       self._calculate_graph()
     File "/usr/local/lib/python3.9/site-packages/airflow/www/views.py", line 
4010, in _calculate_graph
       for dag, dependencies in 
SerializedDagModel.get_dag_dependencies().items():
     File "/usr/local/lib/python3.9/site-packages/airflow/utils/session.py", 
line 70, in wrapper
       return func(*args, session=session, **kwargs)
     File 
"/usr/local/lib/python3.9/site-packages/airflow/models/serialized_dag.py", line 
315, in get_dag_dependencies
       for row in session.query(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", 
line 3373, in all
       return list(self)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", 
line 3535, in __iter__
       return self._execute_and_instances(context)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", 
line 3560, in _execute_and_instances
       result = conn.execute(querycontext.statement, self._params)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1011, in execute
       return meth(self, multiparams, params)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", 
line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1124, in _execute_clauseelement
       ret = self._execute_context(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1316, in _execute_context
       self._handle_dbapi_exception(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1510, in _handle_dbapi_exception
       util.raise_(
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", 
line 182, in raise_
       raise exception
     File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", 
line 1276, in _execute_context
       self.dialect.do_execute(
     File 
"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 
608, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) 
function json_extract_path(json, unknown, unknown) does not exist
   LINE 1: ...T serialized_dag.dag_id AS serialized_dag_dag_id, json_extra...
                                                                ^
   HINT:  No function matches the given name and argument types. You might need 
to add explicit type casts.
   
   [SQL: SELECT serialized_dag.dag_id AS serialized_dag_dag_id, 
json_extract_path(serialized_dag.data, %(json_extract_path_2)s, 
%(json_extract_path_3)s) AS json_extract_path_1 
   FROM serialized_dag]
   [parameters: {'json_extract_path_2': 'dag', 'json_extract_path_3': 
'dag_dependencies'}]
   (Background on this error at: http://sqlalche.me/e/13/f405)
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to