title: Airflow 1.10: sqlalchemy.orm.exc.NoResultFound: No row was found for one()
body: <p>When you follow this tutorial:</p>
  
  <p><a href="http://michal.karzynski.pl/blog/2017/03/19/developing-workflows-with-apache-airflow/" rel="nofollow noreferrer">http://michal.karzynski.pl/blog/2017/03/19/developing-workflows-with-apache-airflow/</a></p>
  
  <p>or when you create any DAG and try it to run using API by this script:</p>
  
  <pre class="lang-sh prettyprint-override"><code>for i in {1..10}; do
      RUN_ID=BASH_REST_CALL__$(uuidgen)
      curl -X POST \
        http://localhost:8080/api/experimental/dags/my_test_dag/dag_runs \
        -H 'Cache-Control: no-cache' \
        -H 'Content-Type: application/json'  -d "{\"run_id\": \"${RUN_ID}\"}" &amp;
   done
  </code></pre>
  
  <p>on some of responses you can see:</p>
  
  <pre><code>                          ____/ (  (    )   )  \___
                           /( (  (  )   _    ))  )   )\
                         ((     (   )(    )  )   (   )  )
                       ((/  ( _(   )   (   _) ) (  () )  )
                      ( (  ( (_)   ((    (   )  .((_ ) .  )_
                     ( (  )    (      (  )    )   ) . ) (   )
                    (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
                    ( (  (   ) (  )   (  ))     ) _)(   )  )  )
                   ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
                    (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
                   ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
                    ((  (   )(    (     _    )   _) _(_ (  (_ )
                     (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
                     ((__)        \\||lll|l||///          \_))
                              (   /(/ (  )  ) )\   )
                            (    ( ( ( | | ) ) )\   )
                             (   /(| / ( )) ) ) )) )
                           (     ( ((((_(|)_)))))     )
                            (      ||\(|(|)|/||     )
                          (        |(||(||)||||        )
                            (     //|/l|||)|\\ \     )
                          (/ / //  /|//||||\\  \ \  \ _)
  -------------------------------------------------------------------------------
  Node: 5b104ab0dac5
  -------------------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
      response = self.full_dispatch_request()
    File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
      raise value
    File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
      rv = self.dispatch_request()
    File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "/usr/local/lib/python3.6/site-packages/airflow/api/auth/backend/default.py", line 32, in decorated
      return function(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/airflow/www/api/experimental/endpoints.py", line 78, in trigger_dag
      dr = trigger.trigger_dag(dag_id, run_id, conf, execution_date)
    File "/usr/local/lib/python3.6/site-packages/airflow/api/common/experimental/trigger_dag.py", line 101, in trigger_dag
      replace_microseconds=replace_microseconds,
    File "/usr/local/lib/python3.6/site-packages/airflow/api/common/experimental/trigger_dag.py", line 77, in _trigger_dag
      external_trigger=True,
    File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 73, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 4382, in create_dagrun
      run.refresh_from_db()
    File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 73, in wrapper
      return func(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 5064, in refresh_from_db
      DR.run_id == self.run_id
    File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3046, in one
      raise orm_exc.NoResultFound("No row was found for one()")
  sqlalchemy.orm.exc.NoResultFound: No row was found for one()
  
  </code></pre>