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

Empty 'output_dir/matches.json' causing errors #18

Open
romainw opened this issue Dec 20, 2023 · 0 comments
Open

Empty 'output_dir/matches.json' causing errors #18

romainw opened this issue Dec 20, 2023 · 0 comments

Comments

@romainw
Copy link
Member

romainw commented Dec 20, 2023

It seems 'output_dir/matches.json' does not exist at least when creating a new instance, which is causing errors:

dnscollector_1  | Exception in thread Thread-8 (daemonized_correlate):
dnscollector_1  | Traceback (most recent call last):
dnscollector_1  |   File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
dnscollector_1  |     self.run()
dnscollector_1  |   File "/usr/local/lib/python3.11/threading.py", line 982, in run
dnscollector_1  |     self._target(*self._args, **self._kwargs)
dnscollector_1  |   File "/usr/local/lib/python3.11/site-packages/pdnssoccli/subcommands/daemonize.py", line 34, in daemonized_correlate
dnscollector_1  |     ctx.invoke(correlate)
dnscollector_1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
dnscollector_1  |     return __callback(*args, **kwargs)
dnscollector_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
dnscollector_1  |   File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
dnscollector_1  |     return f(get_current_context(), *args, **kwargs)
dnscollector_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dnscollector_1  |   File "/usr/local/lib/python3.11/site-packages/pdnssoccli/subcommands/correlate.py", line 289, in correlate
dnscollector_1  |     with jsonlines.open(Path(correlation_config['output_dir'], "matches.json"), mode='a') as writer:
dnscollector_1  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dnscollector_1  |   File "/usr/local/lib/python3.11/site-packages/jsonlines/jsonlines.py", line 643, in open
dnscollector_1  |     fp = builtins.open(file, mode=mode + "t", encoding=encoding)

Maybe this file should be created, even empty, during installation?

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

1 participant