Nermin
Nermin

Reputation: 935

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:

I also tried using , as separator but no luck.

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

Upvotes: 4

Views: 3397

Answers (2)

Anastasiia Solop
Anastasiia Solop

Reputation: 1483

I had the same issue and exporting it to JSON instead of CSV helped. You can use JSON for importing data just like CSV.

Upvotes: 0

Myo Tun Hlaing
Myo Tun Hlaing

Reputation: 161

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

open /Applications/MySQLWorkbench.app

Upvotes: 16

Related Questions