Currently on windows, if a user attempts to use the ZMON CLI, they'll get the following error:
Traceback (most recent call last):
File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python36\Scripts\zmon.exe\__main__.py", line 9, in <module>
File "c:\program files\python36\lib\site-packages\zmon_cli\main.py", line 9, in main
cli()
File "c:\program files\python36\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\program files\python36\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\program files\python36\lib\site-packages\click\core.py", line 1134, in invoke
Command.invoke(self, ctx)
File "c:\program files\python36\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files\python36\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\program files\python36\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\program files\python36\lib\site-packages\zmon_cli\cmds\command.py", line 63, in cli
configure_logging(logging.DEBUG if verbose else logging.INFO)
File "c:\program files\python36\lib\site-packages\zmon_cli\config.py", line 19, in configure_logging
format='%(asctime)s %(levelname)s %(name)s: %(message)s')
File "c:\program files\python36\lib\logging\__init__.py", line 1781, in basicConfig
h = FileHandler(filename, mode)
File "c:\program files\python36\lib\logging\__init__.py", line 1030, in __init__
StreamHandler.__init__(self, self._open())
File "c:\program files\python36\lib\logging\__init__.py", line 1059, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\tmp\\zmon-cli.log'
This might be because the default temp directory on windows is c:\temp and not c:\tmp. Once I made a c:\tmp directory, the issue was solved.
Pre Requisites
Windows machine
Set up for running python commands
Steps to Reproduce
run pip install zmon-cli in your terminal
run the zmon command, confirm that you get a list of options and that it was installed correctly.
run zmon e (or any other command other than just zmon)
Observed Result
The above stack trace.
Expected Result
The command works normally and is able to create a log file.
Currently on windows, if a user attempts to use the ZMON CLI, they'll get the following error:
This might be because the default temp directory on windows is
c:\temp
and notc:\tmp
. Once I made ac:\tmp
directory, the issue was solved.Pre Requisites
Steps to Reproduce
Observed Result The above stack trace.
Expected Result The command works normally and is able to create a log file.