Bug #105399 Mysql Workbench Mac Create Table Wizard can't import CSV, PC can.
Submitted: 1 Nov 2021 14:24 Modified: 9 Dec 2021 13:04
Reporter: Lars Albinsson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.27 OS:MacOS (unknown)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[1 Nov 2021 14:24] Lars Albinsson
Description:
Workbench on Mac fail to import CSV file created from database server.
Workbench on PC can import this properly

Log file:

15:10:56 [ERR][       pymforms]: Unhandled exception in Python code: 
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 538, in encoding_changed
    self.call_create_preview_table()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 343, in call_create_preview_table
    self.create_preview_table(self.call_analyze())
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_wizard.py", line 352, in call_analyze
    if not self.active_module.analyze_file():
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/sqlide_power_import_export_be.py", line 505, in analyze_file
    line = csvfile.readline()
  File "/Applications/MySQLWorkbench.app/Contents/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1254: ordinal not in range(128)

How to repeat:
Every time I try to import the file on Mac the error occurs, always work on PC
[9 Dec 2021 12:44] MySQL Verification Team
Hello Lars Albinsson,

Thank you for the bug report.
I've tried to reproduce your issue on a Mac with workbench 8.0.27 but not seeing any issues at my end.
Discussed internally with the WB developers and confirmed that it is not seen.
If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Regards,
Ashwini Patil
[9 Dec 2021 13:04] Lars Albinsson
Hi!

I suspect this is related to the default on decimal delimiter which in Sweden is "," and "." in English.
Therefore CSV  standard column delimiter in Swedish systems is ";"

You may need to set the computer to Swedish standards, or even use a Swedish version of the OS, to replicate it...

(Yes, I agree, Sweden should change this. Unfortunately there is no way to report this a is a bug to the authorities ;-)