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

Repot generation crashes with message to reach out to author #44

Open
girishbiw opened this issue Sep 6, 2023 · 2 comments
Open

Repot generation crashes with message to reach out to author #44

girishbiw opened this issue Sep 6, 2023 · 2 comments

Comments

@girishbiw
Copy link

When I generated the report I got the following error:

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

Traceback (most recent call last):
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click_plugins/core.py", line 37, in decorator
group.add_command(entry_point.load())
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/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 "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaosreport/init.py", line 15, in
import cairosvg
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairosvg/init.py", line 26, in
from . import surface # noqa isort:skip
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairosvg/surface.py", line 9, in
import cairocffi as cairo
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/cairocffi/init.py", line 47, in
cairo = dlopen(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/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': libcairo.so.2: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'

@girishbiw
Copy link
Author

chaos, version 1.15.1

This is the error I got when I entered
chaos report --help

Traceback (most recent call last):
File "/home/ubuntu/.venvs/chaostk/bin/chaos", line 8, in
sys.exit(cli())
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
super().invoke(ctx)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaostoolkit/cli.py", line 103, in cli
configure_logger(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaostoolkit/logging.py", line 82, in configure_logger
logzero.logfile(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/logzero/init.py", line 440, in logfile
rotating_filehandler = RotatingFileHandler(filename, mode=mode, maxBytes=maxBytes, backupCount=backupCount, encoding=encoding)
File "/usr/lib/python3.10/logging/handlers.py", line 155, in init
BaseRotatingHandler.init(self, filename, mode, encoding=encoding,
File "/usr/lib/python3.10/logging/handlers.py", line 58, in init
logging.FileHandler.init(self, filename, mode=mode,
File "/usr/lib/python3.10/logging/init.py", line 1169, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.10/logging/init.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/chaostoolkit-documentation-code/tutorials/a-simple-walkthrough/chaostoolkit.log'
(chaostk) ubuntu@ip-172-31-40-39:/chaostoolkit-documentation-code/tutorials/a-simple-walkthrough$ chaos report --export-format=pdf journal.json report.pdf
Traceback (most recent call last):
File "/home/ubuntu/.venvs/chaostk/bin/chaos", line 8, in
sys.exit(cli())
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
super().invoke(ctx)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaostoolkit/cli.py", line 103, in cli
configure_logger(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/chaostoolkit/logging.py", line 82, in configure_logger
logzero.logfile(
File "/home/ubuntu/.venvs/chaostk/lib/python3.10/site-packages/logzero/init.py", line 440, in logfile
rotating_filehandler = RotatingFileHandler(filename, mode=mode, maxBytes=maxBytes, backupCount=backupCount, encoding=encoding)
File "/usr/lib/python3.10/logging/handlers.py", line 155, in init
BaseRotatingHandler.init(self, filename, mode, encoding=encoding,
File "/usr/lib/python3.10/logging/handlers.py", line 58, in init
logging.FileHandler.init(self, filename, mode=mode,
File "/usr/lib/python3.10/logging/init.py", line 1169, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.10/logging/init.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: '/chaostoolkit-documentation-code/tutorials/a-simple-walkthrough/chaostoolkit.log'

@cdsre
Copy link

cdsre commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants