Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[misc] tell users to check troubleshooting page when error occurred #1127

Merged
merged 3 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Taichi can be easily installed via ``pip``:
Troubleshooting
---------------

Windows issues
**************

- If Taichi crashes and reports ``ImportError`` on Windows: Please consider installing `Microsoft Visual C++ Redistributable <https://aka.ms/vs/16/release/vc_redist.x64.exe>`_.

Python issues
*************

Expand Down Expand Up @@ -49,7 +54,7 @@ CUDA issues

- If Taichi crashes with the following messages:

.. code-block::
.. code-block:: none

[Taichi] mode=release
[Taichi] version 0.6.0, supported archs: [cpu, cuda, opengl], commit 14094f25, python 3.8.2
Expand All @@ -71,7 +76,7 @@ OpenGL issues

- If Taichi crashes with a stack backtrace containing a line of ``glfwCreateWindow`` (see `#958 <https://github.com/taichi-dev/taichi/issues/958>`_):

.. code-block::
.. code-block:: none

[Taichi] mode=release
[E 05/12/20 18.25:00.129] Received signal 11 (Segmentation Fault)
Expand All @@ -95,4 +100,10 @@ OpenGL issues
Linux issues
************

- If Taichi crashes and reports ``libtinfo.so.5 not found``: Please install ``libtinfo5`` on Ubuntu or ``ncurses5-compat-libs`` (AUR) on Arch Linux.
- If Taichi crashes and reports ``libtinfo.so.5 not found``: Please install ``libtinfo5`` for Ubuntu or ``ncurses5-compat-libs`` (AUR) for Arch Linux.


Other issues
************

- If none of those above address your problem, please report this by `opening an issue <https://github.com/taichi-dev/taichi/issues/new?labels=potential+bug&template=bug_report.md>`_ on GitHub. This would help us improve user experiences and compatibility, many thanks!
6 changes: 4 additions & 2 deletions python/taichi/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ def import_ti_core(tmp_dir=None):
except Exception as e:
if isinstance(e, ImportError):
print(
"Share object taichi_core import failed. If you are on Windows, please consider installing \"Microsoft Visual C++ Redistributable\" (https://aka.ms/vs/16/release/vc_redist.x64.exe)"
)
Fore.YELLOW + "Share object taichi_core import failed, "
"check this page for possible solutions:\n"
"https://taichi.readthedocs.io/en/stable/install.html#troubleshooting"
+ Fore.RESET)
raise e
ti_core = core
if get_os_name() != 'win':
Expand Down
7 changes: 2 additions & 5 deletions python/taichi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,8 @@ def format(self, arguments: list = sys.argv[2:]):
"""Reformat modified source files"""
parser = argparse.ArgumentParser(description=f"{self.format.__doc__}")
parser.add_argument(
'-d',
'--diff',
required=False,
default=None,
dest='diff',
'diff',
nargs='?',
archibate marked this conversation as resolved.
Show resolved Hide resolved
type=str,
help="A commit hash that git can use to compare diff with")
args = parser.parse_args(arguments)
Expand Down
5 changes: 5 additions & 0 deletions taichi/system/traceback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ TI_EXPORT void print_traceback() {
}
std::free(strings);
#endif

fmt::print(
fg(fmt::color::orange),
"\nInternal Error occurred, check this page for possible solutions:\n"
"https://taichi.readthedocs.io/en/stable/install.html#troubleshooting\n");
}

TI_NAMESPACE_END