MSTICPY config https://stackoverflow.com/questions/60160686/syntaxerror-in-jupypter-notebook-for-msticpy-queryproviderfile Error

Lopamudra Bhattacharjee 1 Reputation point
2022-05-10T10:01:28.47+00:00

Getting an error while setting up the MSTICPy Configuration. On running the code below I am getting an error ValueError: File not found: 'None'.

from msticpy.config import MpConfigEdit
import os

mp_conf = "msticpyconfig.yaml"

check if MSTICPYCONFIG is already an env variable

mp_env = os.environ.get("MSTICPYCONFIG")
mp_conf = mp_env if mp_env and Path (mp_env).is_file() else mp_conf

if not Path(mp_conf).is_file():
print(
"No msticpyconfig.yaml was found!",
"Please check that there is a config.json file in your workspace folder.",
"If this is not there, go back to the Microsoft Sentinel portal and launch",
"this notebook from there.",
sep="\n"
)
else:
mpedit = MpConfigEdit(mp_conf)
mpedit.set_tab("AzureSentinel")
display(mpedit)

Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
976 questions
{count} votes