title: MySQL Workbench Migration Wizard python error
body: <p>There are two bugs in bugs.mysql.com related to this same error (<a href="https://bugs.mysql.com/bug.php?id=66861" rel="nofollow noreferrer">1</a> and <a href="https://bugs.mysql.com/bug.php?id=67831" rel="nofollow noreferrer">2</a>). They either provide no solution (#2) or a replacement of the .py that does not solve the problem (#1).</p>
  <p>The error:</p>
  <blockquote>
  <p>File &quot;C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_mysql_re_grt.py&quot;, line 288, in wrap_routine_sql</p>
  <p>return &quot;DELIMITER $$\n&quot;+sql</p>
  <p>TypeError: cannot concatenate 'str' and 'NoneType' objects</p>
  </blockquote>
  <p>So: the line <code>&quot;DELIMITER $$\n&quot;+sql</code> produces the error <code>cannot concatenate 'str' and 'NoneType' objects</code>.</p>
  <p>The error is in the line 288 of the file <code>db_mysql_re_grt.py</code>. <a href="https://github.com/mysql/mysql-workbench/blob/master/modules/db.mysql/db_mysql_re_grt.py#L288" rel="nofollow noreferrer">This is the original .py file</a> from the mysql-workbench's github.</p>
  <p>The call to <code>wrap_routine_sql</code> comes from <a href="https://github.com/mysql/mysql-workbench/blob/master/modules/db.mysql/db_mysql_re_grt.py#L347" rel="nofollow noreferrer">this other line</a>:</p>
  <pre><code>sql = result.stringByName(&quot;Create Procedure&quot;)
  grt.begin_progress_step(0.1 + 0.9 * (i / total), 0.1 + 0.9 * ((i+0.5) / total))
  grt.modules.MySQLParserServices.parseSQLIntoCatalogSql(context, catalog, wrap_sql(wrap_routine_sql(sql), schema_name), options)
  grt.end_progress_step()
  i += 0.5
  </code></pre>