6

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 :/

2
  • report it to oracle, this is a bug in the python script Commented Feb 13, 2022 at 9:51
  • And do post a link to the bug report here, because it also happens in version 8.0.28 😕 Commented Feb 13, 2022 at 10:20

2 Answers 2

18

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

open /Applications/MySQLWorkbench.app
Sign up to request clarification or add additional context in comments.

3 Comments

The year is 2024. The OP is still a problem. Why did this actually fix it??
this is issue is still active with macos and WorkBench 8.0.34 and this trick i.e. opening it from terminal still fixes the issue! thanks
This fixed CSV export for me on macOS 26 Tahoe (beta) and Workbench 8.0.42. Thanks!!!
1

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

1 Comment

JSON also worked for me but import is much slower with JSON

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.