VeriFIT / mata

A fast and simple automata library
MIT License
14 stars 11 forks source link

Error in `get_symbol_map()`, python binding #378

Closed adastepkova closed 4 months ago

adastepkova commented 4 months ago

An error occurs whenever running get_symbol_map() on a non-empty alphabet.

When running the following code:

from libmata import alphabets
alpha = alphabets.OnTheFlyAlphabet.from_symbol_map({'a': 0})
alpha.get_symbol_map()

this error occurs:

File libmata/alphabets.pyx:85, in libmata.alphabets.OnTheFlyAlphabet.get_symbol_map()

AttributeError: 'bytes' object has no attribute 'encode'

I'm using version 1.2.0 of the python binding, installed through pip install. My OS is Ubuntu 22.04.3 LTS.

Adda0 commented 4 months ago

The issue should be now fixed. Let me know if there are more problems for you. Thank you for reporting the issues.