-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
With the latest version, 37.11.0, it is not possible to load fr_FR without error.
>>> fake = Faker('fr_FR')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/code/venv/lib/python3.9/site-packages/faker/proxy.py", line 72, in __init__
self._factory_map[locales[0]] = Factory.create(
File "/code/venv/lib/python3.9/site-packages/faker/factory.py", line 58, in create
prov_cls, lang_found, _ = cls._find_provider_class(prov_name, locale)
File "/code/venv/lib/python3.9/site-packages/faker/factory.py", line 104, in _find_provider_class
provider_module = import_module(path)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/code/venv/lib/python3.9/site-packages/faker/providers/company/fr_FR/__init__.py", line 8, in <module>
class Provider(CompanyProvider):
File "/code/venv/lib/python3.9/site-packages/faker/providers/company/fr_FR/__init__.py", line 376, in Provider
def ape_code(self, version: str | None = "naf-2003") -> str:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
I can load es_ES without problem.
>>> fake = Faker('es_ES')
>>>