Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task pypsaeursec.eGon100-capacities initially failed - missing dependencies? #589

Closed
nesnoj opened this issue Dec 20, 2021 · 0 comments · Fixed by #591
Closed

Task pypsaeursec.eGon100-capacities initially failed - missing dependencies? #589

nesnoj opened this issue Dec 20, 2021 · 0 comments · Fixed by #591
Assignees
Labels
🐛 bug Something isn't working

Comments

@nesnoj
Copy link
Member

nesnoj commented Dec 20, 2021

In a fresh dev installation, task pypsaeursec.eGon100-capacities initially failed, ran successfully after clearing - are there required dependencies not specified in the task?

Code

db.execute_sql(
"""
DELETE FROM supply.egon_scenario_capacities
WHERE scenario_name='eGon100RE'
"""
)

Log

[2021-12-20 13:59:52,458] {taskinstance.py:1150} ERROR - (psycopg2.errors.UndefinedTable) relation "supply.egon_scenario_capacities" does not exist
LINE 2:         DELETE FROM supply.egon_scenario_capacities
                            ^

[SQL: 
        DELETE FROM supply.egon_scenario_capacities
        WHERE scenario_name='eGon100RE'
        ]
(Background on this error at: http://sqlalche.me/e/13/f405)
Traceback (most recent call last):
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "supply.egon_scenario_capacities" does not exist
LINE 2:         DELETE FROM supply.egon_scenario_capacities
                            ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 984, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/storage/eGon-data-sh/code/src/egon/data/datasets/__init__.py", line 195, in skip_task
    result = super(type(task), task).execute(*xs, **ks)
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/airflow/operators/python_operator.py", line 113, in execute
    return_value = self.execute_callable()
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/airflow/operators/python_operator.py", line 118, in execute_callable
    return self.python_callable(*self.op_args, **self.op_kwargs)
  File "/storage/eGon-data-sh/code/src/egon/data/datasets/pypsaeursec/__init__.py", line 257, in eGon100_capacities
    db.execute_sql(
  File "/storage/eGon-data-sh/code/src/egon/data/db.py", line 63, in execute_sql
    con.execute(text(sql_string))
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/storage/eGon-data-sh/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "supply.egon_scenario_capacities" does not exist
LINE 2:         DELETE FROM supply.egon_scenario_capacities
                            ^

[SQL: 
        DELETE FROM supply.egon_scenario_capacities
        WHERE scenario_name='eGon100RE'
        ]
(Background on this error at: http://sqlalche.me/e/13/f405)
[2021-12-20 13:59:52,584] {taskinstance.py:1187} INFO - Marking task as FAILED. dag_id=egon-data-processing-pipeline, task_id=pypsaeursec.eGon100-capacities, execution_date=20211220T123426, start_date=20211220T125951, end_date=20211220T125952
[2021-12-20 13:59:56,872] {local_task_job.py:102} INFO - Task exited with return code 1

@nesnoj nesnoj added the 🐛 bug Something isn't working label Dec 20, 2021
IlkaCu added a commit that referenced this issue Feb 15, 2022
ClaraBuettner added a commit that referenced this issue Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants