fredrik-johansson / fungrim

Fungrim: the Mathematical Functions Grimoire
MIT License
113 stars 15 forks source link

Developer instructions #10

Open certik opened 5 years ago

certik commented 5 years ago

I followed the instructions, and got an error:

$ python fungrim.py 
Unable to read katex_cache
entry 488b6d
Traceback (most recent call last):
  File "fungrim.py", line 416, in <module>
    EntryPage(entry.id()).write()
  File "fungrim.py", line 290, in write
    self.entry(self.id)
  File "fungrim.py", line 275, in entry
    html = entries_dict[id].entry_html(single=True)
  File "/home/ondrej/repos/fungrim/formulas/expr.py", line 934, in entry_html
    s += args[0].html(display=True, single=single)
  File "/home/ondrej/repos/fungrim/formulas/expr.py", line 745, in html
    return self.html_SymbolDefinition()
  File "/home/ondrej/repos/fungrim/formulas/expr.py", line 890, in html_SymbolDefinition
    s += example.html()
  File "/home/ondrej/repos/fungrim/formulas/expr.py", line 748, in html
    return katex(self.latex(), display=display)
  File "fungrim.py", line 90, in katex
    universal_newlines=True)
  File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I assume it's expecting something in path.

certik commented 5 years ago

I have executed npm i katex in the fungrim directory. That created some local files, and then the script works. This should be documented.