Commcare-export to sql problem

Hi all,

I am trying to export the commcare date to output form sql, but
unfortunately I am unable to do it. I use the following command to export
it

commcare-export --query demo-registrations.xlsx --project test1238
–output-format sql --output
’mysql://ganesh1238:ganesh123@127.0.0.1:3306/test’ --since 2014-07-01

it gives us me following error report

Traceback (most recent call last):
File “/usr/local/bin/commcare-export”, line 9, in
load_entry_point(‘commcare-export==0.11.7’, ‘console_scripts’,
‘commcare-export’)()
File “/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py”,
line 181, in entry_point
main(sys.argv[1:])
File “/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py”,
line 71, in main
main_with_args(args)
File “/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py”,
line 135, in main_with_args
engine = sqlalchemy.create_engine(args.output)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/init.py",
line 344, in create_engine
return strategy.create(*args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py",
line 73, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File
"/usr/local/lib/python2.7/dist-packages/sqlalchemy/connectors/mysqldb.py",
line 63, in dbapi
return import(‘MySQLdb’)
ImportError: No module named MySQLdb

Please if any one have any idea about how to resolve this, please post to
this thread asap.

Thanks in advance.

This problem is solved with some minor changes.

anyways Thanks

··· On Monday, July 21, 2014 10:58:08 AM UTC+5:30, ganes...@iiitd.ac.in wrote: > > > > Hi all, > > I am trying to export the commcare date to output form sql, but > unfortunately I am unable to do it. I use the following command to export > it > > commcare-export --query demo-registrations.xlsx --project test1238 > --output-format sql --output 'mysql:// > ganesh1238:ganesh123@127.0.0.1:3306/test' --since 2014-07-01 > > it gives us me following error report > > Traceback (most recent call last): > File "/usr/local/bin/commcare-export", line 9, in > load_entry_point('commcare-export==0.11.7', 'console_scripts', > 'commcare-export')() > File "/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py", > line 181, in entry_point > main(sys.argv[1:]) > File "/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py", > line 71, in main > main_with_args(args) > File "/usr/local/lib/python2.7/dist-packages/commcare_export/cli.py", > line 135, in main_with_args > engine = sqlalchemy.create_engine(args.output) > File > "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", > line 344, in create_engine > return strategy.create(*args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", > line 73, in create > dbapi = dialect_cls.dbapi(**dbapi_args) > File > "/usr/local/lib/python2.7/dist-packages/sqlalchemy/connectors/mysqldb.py", > line 63, in dbapi > return __import__('MySQLdb') > ImportError: No module named MySQLdb > > > Please if any one have any idea about how to resolve this, please post to > this thread asap. > > Thanks in advance. > >