diff --git a/morphi/messages/manager.py b/morphi/messages/manager.py
index 3137358..71c946f 100644
--- a/morphi/messages/manager.py
+++ b/morphi/messages/manager.py
@@ -256,7 +256,7 @@ def gettext_find(domain, localedir=None, languages=None, all=False,  # noqa: C90
                 else:
                     return mofile_lp
 
-        except NotImplementedError:
+        except (NotImplementedError, ValueError):
             pass
 
     return result

Certain paths in locale directory can causes ValueErrors
If a user-specified locale directory contains parent references ('..') or absolute paths, the package resource loader can throw a ValueError.
diff --git a/morphi/tests/test_messages.py b/morphi/tests/test_messages.py
index 8130c1f..da2aacd 100644
--- a/morphi/tests/test_messages.py
+++ b/morphi/tests/test_messages.py
@@ -176,12 +176,17 @@ class TestMessagesManagerFindMoFilename(object):
             yield gettext_find
 
     @pytest.fixture(scope='function')
-    def path_exists(self):
+    def path_exists_enclosure(self):
         with mock.patch(
                 'morphi.libs.packages.enclose_package_path_exists',
-                autospec=True, spec_set=True, return_value=lambda path: False
+                autospec=True, spec_set=True,
+                return_value=mock.Mock(side_effect=lambda path: False)
         ) as enclosure:
-            yield enclosure.return_value
+            yield enclosure
+
+    @pytest.fixture(scope='function')
+    def path_exists(self, path_exists_enclosure):
+        yield path_exists_enclosure.return_value
 
     @pytest.fixture(scope='function')
     def expected(self, path_exists):
@@ -233,6 +238,12 @@ class TestMessagesManagerFindMoFilename(object):
         # attempted_domain, attempted_dirname, languages, all, path_exists=path_exists
         assert expected == gettext_find.call_args_list
 
+    def test_invalid_package_resource_path_throws_no_error(self, path_exists_enclosure):
+        path_exists_enclosure.return_value.side_effect = ValueError
+
+        manager.find_mo_filename(domain='domain', localedir='localedir', languages=['es'],
+                                 package_name='package_name', extension='ext')
+
     def test_file_found(self, path_exists, gettext_find):
         def find_package_i18n_es_path_exists(domain, dirname, languages, all,
                                              path_exists, extension):

pip install -e .[develop]
parse_log_pytest
requirements.txt
3.5
requirements/dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
coverage==6.2
distlib==0.3.9
filelock==3.4.1
flake8==5.0.4
importlib-metadata==4.2.0
importlib-resources==5.4.0
iniconfig==1.1.1
mccabe==0.7.0
mock==5.2.0
-e git+https://github.com/level12/morphi.git@291ca955fbe2d2ef56899f84fca5b51193d09640#egg=morphi
packaging==21.3
platformdirs==2.4.0
pluggy==1.0.0
py==1.11.0
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-cover==3.0.0
pytest-coverage==0.0
pytz==2025.2
six==1.17.0
speaklater==1.3
toml==0.10.2
tomli==1.2.3
tox==3.28.0
typing_extensions==4.1.1
virtualenv==20.16.2
zipp==3.6.0

name: morphi
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - babel==2.11.0
      - coverage==6.2
      - distlib==0.3.9
      - filelock==3.4.1
      - flake8==5.0.4
      - importlib-metadata==4.2.0
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - mccabe==0.7.0
      - mock==5.2.0
      - packaging==21.3
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-cover==3.0.0
      - pytest-coverage==0.0
      - pytz==2025.2
      - six==1.17.0
      - speaklater==1.3
      - toml==0.10.2
      - tomli==1.2.3
      - tox==3.28.0
      - typing-extensions==4.1.1
      - virtualenv==20.16.2
      - zipp==3.6.0
prefix: /opt/conda/envs/morphi

morphi/tests/test_messages.py::TestMessagesManagerFindMoFilename::test_invalid_package_resource_path_throws_no_error
morphi/tests/test_messages.py::TestMessagesFrontendCompileJson::test_output_dir_set_explicitly morphi/tests/test_messages.py::TestMessagesFrontendCompileJson::test_output_dir_from_directory morphi/tests/test_messages.py::TestMessagesFrontendCompileJsonWriteJson::test_write_fuzzy morphi/tests/test_messages.py::TestMessagesFrontendCompileJsonWriteJson::test_elide_fuzzy morphi/tests/test_messages.py::TestMessagesManagerManager::test_gettext morphi/tests/test_messages.py::TestMessagesManagerManager::test_lazy_gettext morphi/tests/test_messages.py::TestMessagesManagerManager::test_lazy_ngettext[0-0 morphi/tests/test_messages.py::TestMessagesManagerManager::test_lazy_ngettext[1-1 morphi/tests/test_messages.py::TestMessagesManagerManager::test_lazy_ngettext[2-2 morphi/tests/test_messages.py::TestMessagesManagerManager::test_ngettext[0-0 morphi/tests/test_messages.py::TestMessagesManagerManager::test_ngettext[1-1 morphi/tests/test_messages.py::TestMessagesManagerManager::test_ngettext[2-2 morphi/tests/test_messages.py::TestMessagesManagerFindMoFilename::test_find_mo_filename morphi/tests/test_messages.py::TestMessagesManagerFindMoFilename::test_single_languages_are_listified morphi/tests/test_messages.py::TestMessagesManagerFindMoFilename::test_file_found morphi/tests/test_messages.py::TestMessagesManagerGetMoData::test_no_file_found morphi/tests/test_messages.py::TestMessagesManagerGetMoData::test_filesystem_opener morphi/tests/test_messages.py::TestMessagesManagerGetMoData::test_package_opener morphi/tests/test_messages.py::TestMessagesManagerGetMoData::test_filesystem_fallback_for_package_opener morphi/tests/test_messages.py::TestMessagesManagerLoadTranslations::test_load_fails morphi/tests/test_messages.py::TestMessagesManagerLoadTranslations::test_load
morphi/messages/manager.py
morphi/messages/manager.py