Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FILE_CHARSET error on a wagtail/django error #89

Open
MFrancisca opened this issue Sep 7, 2022 · 0 comments
Open

FILE_CHARSET error on a wagtail/django error #89

MFrancisca opened this issue Sep 7, 2022 · 0 comments

Comments

@MFrancisca
Copy link

Hello,

I'm trying to setup this plugin in a wagtail/django project (Django 4.0, wagtail 3.X). I have the package installed, set in the configuration for coverage and my django templates have the debug option as true.

When I run coverage run manage.py test I get the following error

  File "C:\ProgramData\Anaconda3\envs\wagtail_venv\lib\site-packages\django_coverage_plugin\plugin.py", line 243, in line_number_range
    line_map = self.get_line_map(filename)
  File "C:\ProgramData\Anaconda3\envs\wagtail_venv\lib\site-packages\django_coverage_plugin\plugin.py", line 269, in get_line_map
    template_source = read_template_source(filename)
  File "C:\ProgramData\Anaconda3\envs\wagtail_venv\lib\site-packages\django_coverage_plugin\plugin.py", line 137, in read_template_source
    text = f.read().decode(settings.FILE_CHARSET)
  File "C:\ProgramData\Anaconda3\envs\wagtail_venv\lib\site-packages\django\conf\__init__.py", line 85, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'FILE_CHARSET'. Did you mean: 'DEFAULT_CHARSET'?
C:\ProgramData\Anaconda3\envs\wagtail_venv\lib\site-packages\coverage\collector.py:406: CoverageWarning: Disabling plug-in 'django_coverage_plugin.DjangoTemplatePlugin' due to previous exception

This is disabling the plugin in coverage so I'm not getting any results.

Am I doing something wrong? or is something that needs to be fixed?

THank you

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant