Generating a local copy of the Keras-IO website on windows

I tried to buikd keras-io on windows 10 machine. I followed the instruction. I did

git clone

pip install -r requirements.txt
cd scripts
python make
python serve

But when I tried to run python make, it gives the following error

Traceback (most recent call last):
  File "C:\Users\suz\anaconda3\lib\", line 1039, in parse_template
    this = chr(ESCAPES[this][1])
KeyError: '\\m'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\suz\anaconda3\lib\multiprocessing\", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\suz\Downloads\keras-io\scripts\", line 659, in render_single_file
    md_content = re.sub(
  File "C:\Users\suz\anaconda3\lib\", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "C:\Users\suz\anaconda3\lib\", line 327, in _subx
    template = _compile_repl(template, pattern)
  File "C:\Users\suz\anaconda3\lib\", line 318, in _compile_repl
    return sre_parse.parse_template(repl, pattern)
  File "C:\Users\suz\anaconda3\lib\", line 1042, in parse_template
    raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \m at position 11

( Do I need to install TensorFlow from the source to fix this issue ?? )

I like to contribute to keras io but I couldn’t build keras io locally. What can be the causes of this issue?

Yeah, posted the issue there but no response.

Hello! I’m not sure I can help you, but I’m wondering how you are going to use Keras io?

I don’t know for sure, but based on the fact it’s a Windows issue, and that the error relates to slashes (\m), I suspect different paths across platforms are going to be an issue (e.g. /tmp/linux vs c:\windows).

One thing you can try is to run whatever scripts you have inside a Linux-like environment on Windows, e.g. the Git bash shell (which runs with a linuxy file system), or the more recent WSL.

Do I need to install TensorFlow from the source to fix this issue ??

I wouldn’t expect this to make much difference. Did you have an error or log that indicates otherwise? If so, please share your thinking.

1 Like