liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.45k stars 223 forks source link

Name error on obfuscation #71

Open i5ar opened 8 years ago

i5ar commented 8 years ago

I have this error when using apply_obfuscation(): File "C:\Users\...\Python35-32\lib\site-packages\pyminifier\obfuscate.py", line 92, in apply_obfuscation tokens, obfuscate_variable, variable, name_generator) NameError: name 'name_generator' is not defined.

The script I'm using to minify the source:

with open('main.py', 'r') as f:
    source= f.read()
    print (source)
    source = pyminifier.minification.remove_comments_and_docstrings(source)
    print (source)
    source = pyminifier.minification.remove_blank_lines(source)
    print (source)
    source = pyminifier.obfuscate.apply_obfuscation(source) # Here the error!
    ...

Thank you!

eternadox commented 1 year ago

I also have this issue