Fabrice,
In the mysql_storage object, right before line 138, try doing this on
the string representing the query:
query = query.replace('\'', '\\\'')
Travis
Fabrice Marchal wrote:
> Hi,
>
> we had a small problem moving data from mysql -> cache and back to mysql
> with some string sequences that contain the " ' " character (i.e. French
> zone names)
>
> the data were modified in mysql. flushing them to the cache works but
> we had the following problem with a subsequent export_from_cache_to_mysql:
>
> File "opus_core/tools/do_export_cache_to_mysql_database.py", line 99,
> in <module>
> ExportStorage().export(in_storage=input_storage,
> out_storage=output_storage)
> File "/home/fmarchal/opus-4.1/opus_core/export_storage.py", line 32,
> in export
> File "/home/fmarchal/opus-4.1/opus_core/export_storage.py", line 41,
> in export_dataset
> File "/home/fmarchal/opus-4.1/opus_core/store/mysql_storage.py", line
> 138, in write_table
> _mysql_exceptions.ProgrammingError: (1064, "You have an error in your
> SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near 'Abeau (L'
> )',1.0,51064,2,3,10861,381930101,2,1,2,1,1,1,0)' at line 1")
>
>
> Regards,
>
> Fabrice
>
>
> =====================================================
> Fabrice Marchal
> http://marchal.let.fr
> CNRS Associate researcher +33 472
> 72 79 44
> Lab of Transportation Economics (LET), Berthelot 14, F-69363 Lyon
> =====================================================
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users_at_urbansim.org
> http://www.urbansim.org/mailman/listinfo/users
Received on Thu Nov 29 2007 - 09:26:05 PST
This archive was generated by hypermail 2.2.0 : Thu Nov 29 2007 - 09:26:06 PST