Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Test failure due to Unicode character #13

@lionelbroche

Description

@lionelbroche

Running the test suite on Windows 10 with TeXMaker lead to the following failure:

______________________________________________ test_latex_cv_write_latex ______________________________________________

latexcv = <autocv.latex.LatexCV object at 0x0000013D971690D0>
tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x0000013D93018100>, _basetemp=WindowsPath('C:/Users/xxx/AppData/Local/Temp/pytest-of-mph648/pytest-0')))

    def test_latex_cv_write_latex(latexcv, tmpdir_factory):
        outfile = tmpdir_factory.mktemp("data").join("test.tex")
>       latexcv.write_latex(outfile)

tests\test_latex.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
autocv\latex.py:56: in write_latex
    f.write(getattr(self, section))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <encodings.cp1252.IncrementalEncoder object at 0x0000013D97169220>
input = '\\section*{Publications (Google Scholar H-index = 129)}\\subsection*{2022}Adebimpe A, Bertolero M, Dolui S et al. (20...ations. \\textit{Psychon Bull Rev, 3}, 434-48. \\href{http://dx.doi.org/10.3758/bf03214547}{DOI} \\vspace{2mm}\r\n\r\n'
final = False

    def encode(self, input, final=False):
>       return codecs.charmap_encode(input,self.errors,encoding_table)[0]
E       UnicodeEncodeError: 'charmap' codec can't encode character '\u0144' in position 34449: character maps to <undefined>

C:\ProgramData\Anaconda3\lib\encodings\cp1252.py:19: UnicodeEncodeError

I also got the following warning:

..\..\..\..\..\ProgramData\Anaconda3\lib\site-packages\pyreadline\py3k_compat.py:8
  C:\ProgramData\Anaconda3\lib\site-packages\pyreadline\py3k_compat.py:8: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    return isinstance(x, collections.Callable)

..\..\..\..\..\ProgramData\Anaconda3\lib\site-packages\win32\lib\pywintypes.py:2
  C:\ProgramData\Anaconda3\lib\site-packages\win32\lib\pywintypes.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp, sys, os

autocv\utils.py:174
  C:\Users\mph648\Documents\GitHub\autoCV\autocv\utils.py:174: DeprecationWarning: invalid escape sequence \&
    setattr(pub, field, value.replace(' &', ' \&') ) # noqa

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions