Skip to content
This repository has been archived by the owner on May 30, 2020. It is now read-only.

[pypi] TypeError: argument of type 'NoneType' is not iterable #658

Closed
jmreymond opened this issue Jul 3, 2017 · 1 comment
Closed

[pypi] TypeError: argument of type 'NoneType' is not iterable #658

jmreymond opened this issue Jul 3, 2017 · 1 comment
Labels

Comments

@jmreymond
Copy link

jmreymond commented Jul 3, 2017

After a fresh installation on my ubuntu server, I try to migrate mysql database to postgresql database and I have the following error message:

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/py-mysql2pgsql", line 38, in <module>
    mysql2pgsql.Mysql2Pgsql(options).convert()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/mysql2pgsql.py", line 31, in convert
    Converter(reader, writer, self.file_options, self.run_options.verbose).convert()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/converter.py", line 31, in convert
    self.writer.write_table(table)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/__init__.py", line 90, in decorated_function
    return f(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_db_writer.py", line 151, in write_table
    table_sql, serial_key_sql = super(PostgresDbWriter, self).write_table(table)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_writer.py", line 177, in write_table
    primary_keys, serial_key, maxval, columns = self.table_attributes(table)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_writer.py", line 153, in table_attributes
    columns.write('  %s,\n' % self.column_description(column))
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_writer.py", line 18, in column_description
    return '"%s" %s' % (column['name'], self.column_type_info(column))
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_writer.py", line 107, in column_type_info
    default, column_type = get_type(column)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/mysql2pgsql/lib/postgres_writer.py", line 79, in get_type
    if "CURRENT_TIMESTAMP" in column['default']:
TypeError: argument of type 'NoneType' is not iterable

Any tips ?
thanks

@berkerpeksag
Copy link
Collaborator

berkerpeksag commented Jul 3, 2017

Thank you for the report. This tracker is for issues with pypi.python.org. Please use https://github.com/philipsoutham/py-mysql2pgsql/ to report your problem. In your case, it has already been reported at philipsoutham/py-mysql2pgsql#96.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants