TypeError: unsupported format string passed to NoneType.__format__

When i execute the “generate_package.py” command, the below log is occurs.

root@6e778d6caced:/DeepSpeech# python3 ./data/lm/generate_package.py \
>   --alphabet /mnt/deepspeechdata/fast/CV/zh-HK/alphabet.txt \
>   --lm /mnt/deepspeechdata/fast/lm/lm.binary \
>   --vocab /mnt/deepspeechdata/fast/lm/vocab-10000.txt \
>   --package /mnt/deepspeechdata/fast/lm/kenlm.scorer \
>   --default_alpha 0.931289039105002 \
>   --default_beta 1.1834137581510284 \
>
47 unique words read from vocabulary file.
Looks like a character based model.
Using detected UTF-8 mode: True
Traceback (most recent call last):
  File "./data/lm/generate_package.py", line 153, in <module>
    main()
  File "./data/lm/generate_package.py", line 148, in main
    args.default_beta,
  File "./data/lm/generate_package.py", line 59, in create_bundle
    print('Error loading language model file: 0x{:X}.'.format(err))
TypeError: unsupported format string passed to NoneType.__format__
swig/python detected a memory leak of type 'Alphabet *', no destructor found.

It seem to v0.7.1 the new error msg, is that mean my dataset have problem?

And i found the value of “err” is “None”.

Please use the v0.7.1 of generate_package.py, matching the version of ds_ctcdecoder you have installed. It looks like you’re running from a more recent master.

Using v0.7.1 should fix this, but there is also a bug in the decoder binding, thanks for reporting.

1 Like