title: Not enough arguments for format string
body: <p>I am trying to execute a query using SQLAlchemy</p>
  
  <pre><code>dev_engine = create_engine('mysql://...')
  
  dev_connect = dev_engine.connect()
  prod_connect = prod_engine.connect()
  
  
  get_dev_instrument = "select * from market_instrument inner join cme_instrument on market_instrument.id = cme_instrument.instrument_id \
  inner join tick_size on market_instrument.id = tick_size.instrument_id \
  left join futures on market_instrument.id = futures.instrument_id \
  left join `options`on market_instrument.id = `options`.instrument_id \
  left join spreads on market_instrument.id = spreads.instrument_id \
  inner join (select distinct(substring(m.symbol, 1, 2)) as product from market_instrument as m inner join fills as f on m.id=f.instrument_id \
  inner join cme_instrument where symbol&lt;&gt;\"\" and fill_timestamp between CURDATE() - INTERVAL 60 DAY AND NOW()) r \
  on market_instrument.symbol like concat(r.product, \'%\') \
  where symbol not like \'%_old%\' and symbol not like \'%:%\';"
  
  instruments = dev_engine.execute(get_dev_instrument)
  </code></pre>
  
  <p>I keep getting <code>TypeError: not enough arguments for format string</code></p>
  
  <pre><code>Traceback (most recent call last):
    File "check_instrument_transactions-cme.py", line 122, in &lt;module&gt;
      main()
    File "check_instrument_transactions-cme.py", line 120, in main
      transactions(exchange, last_days, filepath)
    File "check_instrument_transactions-cme.py", line 28, in transactions
      instruments = dev_engine.execute(get_dev_instrument)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1991, in execute
      return connection.execute(statement, *multiparams, **params)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 906, in execute
      return self._execute_text(object, multiparams, params)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1054, in _execute_text
      statement, parameters
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
      context)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1344, in _handle_dbapi_exception
      util.reraise(*exc_info)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
      context)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
      cursor.execute(statement, parameters)
    File "/home/local/filepath/anaconda2/lib/python2.7/site-packages/MySQLdb/cursors.py", line 187, in execute
      query = query % tuple([db.literal(item) for item in args])
  TypeError: not enough arguments for format string
  </code></pre>
  
  <p>I looked this error up but it says to pass the string you want to format as a tuple and this error seems to be part of the underlying API rather than my code. What is the issue? I have run a similar length query before using the same exact code and I had no TypeError doing so.</p>