Skip to content

UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 970: character maps to <undefined> #188

Description

@Looki2000

After installing the library with pip and trying to initialize it, I'm getting the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\elect\AppData\Local\Programs\Python\Python312\Lib\site-packages\epitran\_epitran.py", line 39, in __init__
    self.epi = SimpleEpitran(code, preproc, postproc, ligatures, rev, rev_preproc, rev_postproc, tones=tones)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\elect\AppData\Local\Programs\Python\Python312\Lib\site-packages\epitran\simple.py", line 46, in __init__
    self.ft = panphon.FeatureTable()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\elect\AppData\Local\Programs\Python\Python312\Lib\site-packages\panphon\featuretable.py", line 62, in __init__
    self.segments, self.seg_dict, self.names = self._read_bases(bases_fn, self.weights)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\elect\AppData\Local\Programs\Python\Python312\Lib\site-packages\panphon\featuretable.py", line 81, in _read_bases
    header = next(reader)
             ^^^^^^^^^^^^
  File "C:\Users\elect\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1250.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 970: character maps to <undefined>

epi = epitran.Epitran("eng-Latn")
It does not matter what language.

Python 3.12.5
epitran 1.25.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions