chaostoolkit / chaostoolkit

Chaos Engineering Toolkit & Orchestration for Developers
https://chaostoolkit.org
Apache License 2.0
1.89k stars 185 forks source link

Chaos report feature dos not work #289

Open wride95 opened 11 months ago

wride95 commented 11 months ago

i was trying to export the journal.json which was created by chaos experiment i encountered the below error i am using python 3.10. no matter how many times i re-created the new python ENV for the experiment i faced the same issue.

(chaos) C:\Users\Administrator\Desktop\Chaos\chaos\chaostoolkit-aws\chaosaws\ec2>$ chaos report --export-format=html5 journal.json report.html '$' is not recognized as an internal or external command, operable program or batch file.

(chaos) C:\Users\Administrator\Desktop\Chaos\chaos\chaostoolkit-aws\chaosaws\ec2>chaos report --export-format=html5 journal.json report.html

Warning: entry point could not be loaded. Contact its author for help.

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\click_plugins\core.py", line 37, in decorator group.add_command(entry_point.load()) File "C:\Program Files\Python310\lib\importlib\metadata__init__.py", line 162, in load module = import_module(match.group('module')) File "C:\Program Files\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\chaosreport\init.py", line 15, in import cairosvg File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\cairosvg\init.py", line 26, in from . import surface # noqa isort:skip File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\cairosvg\surface.py", line 9, in import cairocffi as cairo File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\cairocffi\init.py", line 47, in cairo = dlopen( File "C:\Users\Administrator\Desktop\Chaos\chaos\lib\site-packages\cairocffi\init__.py", line 44, in dlopen raise OSError(error_message) # pragma: no cover OSError: no library called "cairo-2" was found no library called "cairo" was found no library called "libcairo-2" was found cannot load library 'libcairo.so.2': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2' cannot load library 'libcairo.2.dylib': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib' cannot load library 'libcairo-2.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'

please guide me on this

cdsre commented 8 months ago

Technically this issue actually belongs on ctk-reporting. How have you installed the reporting extension and have you set up the underlying required libraries which python cannot pull in? These are documented as additional install steps.

There somethings pip just cannot pull in and install for you. These are requirements that may use other technologies, languages or packaging solutions. In this case you need to install cairo and pandoc your self locally for ctk-reporting to work as it cant install these for you.

Alternatively and my preferred approach is to just run this through docker as the docker image has all the required binaries and packages installed for you. check out the using a docker image section.