Execution error in Phyton 3.7.4. Error in brute module
File "C:\Python37-32\lib\site-packages\brute.py", line 68 product( ^ SyntaxError: Generator expression must be parenthesized
I modified the brute.py file
File "C:\Python37-32\lib\site-packages\brute.py", line 68 product( ^ SyntaxError: Generator expression must be parenthesized
I still get the same error at python 3.7.3
I get the same problem for python 3.7.1
Even after updating Django ! I still get the same error !
Hi!
Not using Django at all, Python 3.8.0 in fresh virtualenv. Same issue.
Same for Python 3.8.1
I think this library was supposed to be made for Python 2
replace last few line return with the code .This will works i modify it
return ( ''.join(candidate) for candidate in chain.from_iterable((product(choices,repeat = i,) for i in range(start_length if ramp else length, length + 1))))
File "C:\Python37-32\lib\site-packages\brute.py", line 68 product( ^ i got it too.
now i solve my problem. I have change to
return ( ''.join(candidate) for candidate in chain.from_iterable( [product( choices, repeat = i, ) for i in range(start_length if ramp else length, length + 1)] ) )
in location C:\Users\pheas\AppData\Local\Programs\Python\Python39\lib\site-packages\brute.py. hope you enjoy.