Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not parse address: AttributeError: 'str' object has no attribute 'decode' #5

Open
chaya-tan opened this issue Dec 28, 2020 · 0 comments

Comments

@chaya-tan
Copy link

>>> thaiaddress.parse("นายปรายุ้ด จันทร์กะเพรา 099-999-9999 25/25 ถ.พุทธมณฑล สาย 4 ต. ศาลายา อ.พุทธมณฑล จ.นครปฐม 73170")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/thaiaddress/parser.py", line 211, in parse
    tokens = tokenize.word_tokenize(text, engine=tokenize_engine)
  File "/usr/local/lib/python3.8/site-packages/pythainlp/tokenize/core.py", line 161, in word_tokenize
    segments = segment(text)
  File "/usr/local/lib/python3.8/site-packages/pythainlp/tokenize/deepcut.py", line 30, in segment
    return tokenize(text)
  File "/usr/local/lib/python3.8/site-packages/deepcut/deepcut.py", line 46, in tokenize
    TOKENIZER = DeepcutTokenizer()
  File "/usr/local/lib/python3.8/site-packages/deepcut/deepcut.py", line 133, in __init__
    self.model.load_weights(WEIGHT_PATH)
  File "/usr/local/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2211, in load_weights
    hdf5_format.load_weights_from_hdf5_group(f, self.layers)
  File "/usr/local/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 660, in load_weights_from_hdf5_group
    original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant