[pycharm] PY-72059 Add an error displaying when numpy is not installed

GitOrigin-RevId: 082917ec37b99955c9538ddf2154618f0a07fdaa
This commit is contained in:
ekaterina.itsenko
2024-06-19 22:02:25 +02:00
committed by intellij-monorepo-bot
parent 73145926fc
commit d4e3fbb089
2 changed files with 7 additions and 0 deletions

View File

@@ -744,6 +744,7 @@ debugger.data.view.close=Close
debugger.data.view.resize.automatically=Resize automatically
debugger.data.view.colored.cells=Colored cells
debugger.data.view.failed.to.evaluate.expression=Failed to evaluate the expression {0}
debugger.data.view.numpy.is.not.available=NumPy is not available. Install the module for proper data display.
debugger.data.view.type.is.not.supported={0} is not supported
debugger.data.view.empty.tab=Empty
debugger.numeric.view.as.dataframe=View as DataFrame

View File

@@ -220,6 +220,12 @@ open class PyDataViewerPanel(@JvmField protected val project: Project, val frame
catch (e: PyDebuggerException) {
LOG.error(e)
}
catch (e: Exception) {
if (e.message?.let { "Numpy is not available" in it } == true) {
setError(PyBundle.message("debugger.data.view.numpy.is.not.available", type), modifier)
}
LOG.error(e)
}
}
}