Hi,

I looked at the file you sent me, but it imports fine under Windows...

So, this must be some OSX specific bug. I've put Devin, our Mac developer in CC.

The relevant code is in:

https://github.com/pbienst/mnemosyne/blob/pbienst/mnemosyne/libmnemosyne/file_formats/tsv.py

f = open(filename, encoding="utf-8")

which doesn't seem to select the correct encoding on OSX...

Cheers,

Peter

> -----Original Message-----
> From: [email protected] [mailto:mnemosyne-
> [email protected]] On Behalf Of [email protected]
> Sent: 29 June 2019 00:41
> To: mnemosyne-proj-users <[email protected]>
> Subject: [mnemosyne-proj-users] 'ascii' codec can't encode
> character...ordinal not in range(128)
> 
> Hi,
> 
> Full error message:
> 'ascii' codec can't encode character '\xe8' in position 14: ordinal not in
> range(128)
> Traceback (innermost last):
> File "mnemosyne/pyqt_ui/qt_worker_thread.py", line 52, in run
> File "mnemosyne/pyqt_ui/import_dlg.py", line 41, in do_work
> File "mnemosyne/libmnemosyne/file_formats/tsv.py", line 89, in do_import
> UnicodeEncodeError: 'ascii' codec can't encode character '\xe8' in position 
> 14:
> ordinal not in range(128)
> 
> The file is tab-delimited in UTF-8 exported from LibreOffice Calc.
> Per instructions, UTF-8, tab, deleted string delimeter (assumed this is what
> you meant by "clear").  Unchecked "Save cell content as shown."  Would not
> detect, so renamed to .tsv and it was detected.  (Would be helpful to update
> webpage instructions to this effect.)
> 
> The character it dislikes is 'รจ'.
> 
> It crashes on first accented character it detects.
> 
> I have tried .txt with the same data from LibreOffice in UTF-8.  Same result.
> 
> Tried exporting to US-ASCII.  That imported but all accented characters were
> rendered as '?'.
> 
> Running macOS 10.14.5
> 
> python -V
> Python 2.7.10
> 
> Was really hoping to use this program.  Rest of it looks great.  Hope it could
> be fixed soon.
> 
> Thanks,
> 
> Chris
> 
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to mnemosyne-proj-
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/8edbc5b9-
> adae-4427-b8e5-ab9d33d26ec8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mnemosyne-proj-users/a00dceae7e664e71b4cb46ee2f554a89%40xmail101.UGent.be.
For more options, visit https://groups.google.com/d/optout.

Reply via email to