I am trying to set up a new repo which has very limited instructions. I am getting this error when running "pipenv run python manage.py runserver". The file the error message refers to exists and does not look to be corrupted. What can I do about this?
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check
all_issues = self._run_checks(
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 588, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/recvalsite/urls.py", line 22, in <module>
urlpatterns = [path("admin/", admin.site.urls), path("", include("validation.urls"))]
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/.venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/validation/urls.py", line 24, in <module>
from . import views
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/validation/views.py", line 76, in <module>
from .helpers import (
File "/cshome/bsapara/Documents/ALT/recording-validation-interface/validation/helpers.py", line 29, in <module>
fst = hfst_optimized_lookup.TransducerFile(
File "hfst_optimized_lookup/_hfst_optimized_lookup.pyx", line 61, in hfst_optimized_lookup._hfst_optimized_lookup.TransducerFile.__cinit__
RuntimeError: Parsing error while reading transducer header; wrong or corrupt file?
**Edit to share relevant parts of views.py and helpers.py:
#views.py
from .helpers import (
get_distance_with_translations,
)
#helpers.py
import hfst_optimized_lookup
fst = hfst_optimized_lookup.TransducerFile(
fspath(settings.BASE_DIR / "crk-descriptive-analyzer.hfstol")
)