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

Script error #4

Open
ViperelB opened this issue Jun 11, 2023 · 0 comments
Open

Script error #4

ViperelB opened this issue Jun 11, 2023 · 0 comments

Comments

@ViperelB
Copy link

ViperelB commented Jun 11, 2023

while parsing a wiki i get this error in the terminal:

Traceback (most recent call last):
File "/home/kali/wikiraider/wikiraider.py", line 143, in
main()
File "/home/kali/wikiraider/wikiraider.py", line 139, in main
ActionParse(args).run()
File "/home/kali/wikiraider/wikiraider/actions/ActionParse.py", line 105, in run
self.on_finish()
File "/home/kali/wikiraider/wikiraider/actions/ActionParse.py", line 124, in on_finish
colorlog.getLogger().info('Here are 10 of them {}.'.format(random.sample(self.queue.results, 10)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/random.py", line 439, in sample
raise TypeError("Population must be a sequence. "
TypeError: Population must be a sequence. For dicts or sets, use sorted(d).

I fixed it myself by changing that line 124
original:
colorlog.getLogger().info('Here are 10 of them {}.'.format(random.sample(self.queue.results, 10)))
edited:
colorlog.getLogger().info('Here are 10 of them {}.'.format(random.sample(list(self.queue.results), 10)))

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

No branches or pull requests

1 participant