Skip to content

Running "mathicsscript" gets FileNotFoundError: mathicsscript/data/mma-tables.json #37

@tueda

Description

@tueda

When I tried to start Mathicscript (3.0.0), which was installed in a clean virtual environment, it gave me

$ mathicsscript
Traceback (most recent call last):
  File "/home/tueda/tmp/test-mathicsscript/.venv/bin/mathicsscript", line 8, in <module>
    sys.exit(main())
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/mathicsscript/__main__.py", line 257, in main
    shell = TerminalShellPromptToolKit(
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/mathicsscript/termshell.py", line 368, in __init__
    self.completer = MathicsCompleter(self.definitions) if want_completion else None
  File "/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/mathicsscript/completion.py", line 75, in __init__
    with open(osp.join(get_datadir(), "mma-tables.json"), "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/tueda/tmp/test-mathicsscript/.venv/lib/python3.9/site-packages/mathicsscript/data/mma-tables.json'

The exception looks like something about the completion, so I tried the --no-completion option to switch off the compleiton, and it worked:

$ mathicsscript --no-completion

Mathicscript: 3.0.0, Mathics 2.2.0
on CPython 3.9.4 (default, Apr  7 2021, 05:45:11)
using SymPy 1.8, mpmath 1.2.1, numpy 1.20.3

Copyright (C) 2011-2021 The Mathics Team.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See the documentation for the full license.

Quit by evaluating Quit[] or by pressing CONTROL-D.

In[1]:= Quit[]


Goodbye!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions