Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench table export UnicodeEncodeError

I am trying to export one of our production tables so I can import it to a local db to experiment with.

But I get this error:

Traceback (most recent call last): File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 197, in thread_work self.func() File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_export_wizard.py", line 273, in start_export retval = self.module.start(self.stop) File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_export_be.py", line 302, in start ret = self.start_export() File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_export_be.py", line 398, in start_export output.writerow(row) UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 10: ordinal not in range(128)
ERROR: Export data to file: 'ascii' codec can't encode character '\xf6' in position 10: ordinal not in range(128)

I am running version 8.0.26 on MacOS.

Edit: I used the following options:

  • File Format: csv
  • Field Separator: ;
  • Line Separator: LF
  • Enclose Strings In: "
  • null and NULL as SQL keyword: YES

I also tried using , as separator but no luck.

However, exporting as JSON works! It seems slower though :/

like image 337
Nermin Avatar asked Aug 26 '26 16:08

Nermin


1 Answers

If you are using on mac, try starting mySql Workbench from command.

open /Applications/MySQLWorkbench.app
like image 94
Myo Tun Hlaing Avatar answered Aug 29 '26 05:08

Myo Tun Hlaing