Two different errors I encountered. The first one is that I get the following terminal output:
Traceback (most recent call last):
File "D:\Users\Matthew\downloads\thebookofshaders\src\parseBook.py", line 73, in <module>
fileString = originalChapter.read()
^^^^^^^^^^^^^^^^^^^^^^
File "D:\msys64\mingw64\lib\python3.11\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4870: character maps to <undefined>
make: *** [Makefile:17: pdf] Error 1
I fixed this by setting encoding='utf-8' in the open functions.
My second issue is something I cannot figure out why because it works with mingw64 shell.
Traceback (most recent call last):
File "D:\Users\Matthew\downloads\thebookofshaders\src\parseBook.py", line 78, in <module>
modifiedChapterString = re.sub(imgPattern, subPattern, fileString)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\msys64\mingw64\lib\python3.11\re\__init__.py", line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\msys64\mingw64\lib\python3.11\re\__init__.py", line 317, in _subx
template = _compile_repl(template, pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\msys64\mingw64\lib\python3.11\re\__init__.py", line 308, in _compile_repl
return _parser.parse_template(repl, pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\msys64\mingw64\lib\python3.11\re\_parser.py", line 1081, in parse_template
addgroup(int(this[1:]), len(this) - 1)
File "D:\msys64\mingw64\lib\python3.11\re\_parser.py", line 1017, in addgroup
raise s.error("invalid group reference %d" % index, pos)
re.error: invalid group reference 10 at position 4
make: *** [Makefile:17: pdf] Error 1
I don't know if windows was ever intended for being built on, but just wanted to file a bug report it fails to build on windows outside of some sort of POSIX emulation.
Two different errors I encountered. The first one is that I get the following terminal output:
I fixed this by setting encoding='utf-8' in the open functions.
My second issue is something I cannot figure out why because it works with mingw64 shell.
I don't know if windows was ever intended for being built on, but just wanted to file a bug report it fails to build on windows outside of some sort of POSIX emulation.