prosegrinder / python-cmudict

A versioned python wrapper package for cmudict (https://github.com/cmusphinx/cmudict).
GNU General Public License v3.0
61 stars 6 forks source link

AttributeError: module 'importlib_resources' has no attribute 'open_binary' w/ Python 3.9 and importlib-resources-6.1.1 #58

Closed strubell closed 8 months ago

strubell commented 9 months ago

Hi, thanks for maintaining this package!

I get the following exception:

AttributeError: module 'importlib_resources' has no attribute 'open_binary'

when trying to import cmudict with cmudict version 1.0.16, Python 3.9 and importlib-resources-6.1.1.

I didn't investigate too deeply but I think it's probably related to commit 1adee16 which fixed another problem but introduced this one. Perhaps related to using an older Python version with a newer version of importlib than expected?

Downgrading to cmudict-1.0.15 solves the problem for me.

Even if you decide not to implement a fix for this, I figured I would post here for anyone else who runs into this bug.

planetchili commented 9 months ago

Ran into this problem as well, using Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32

davidlday commented 8 months ago

Thank you both for bringing this to my attention, and my apologies for the delay acknowledging. I will look into this over the weekend and hopefully get it resolved.