You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)))
The text was updated successfully, but these errors were encountered:
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)))
The text was updated successfully, but these errors were encountered: