pyminifier
pyminifier copied to clipboard
TypeError: obfuscation_machine() got an unexpected keyword argument 'count'
I had this very easy issue when using the following command: pyminifier --obfuscate --pyz=test.pyz test.py
Traceback (most recent call last):
File "/usr/local/bin/pyminifier", line 11, in
The fix is straightforward, I already tested it on my side. In the file pyminifier/compression.py on line 230 just substitute: count=identifier_length with: identifier_length=identifier_length
Probably the keyword argument name was not changed everywhere.
Hope this helps!
Along with pyz flag, when I use --outfile I encounter
pwd/pyminifier/pyminifier.py", line 423, in main f = open(options.outfile, 'w', encoding='utf-8')
TypeError: 'encoding' is an invalid keyword argument for this function
I believe this may of be some help
http://stackoverflow.com/questions/25049962/is-encoding-is-an-invalid-keyword-error-inevitable-in-python-2-x
This is fixed in version 2.2.
pip install git+git://github.com/liftoff/pyminifier.git@master
to get the latest version.
There is also a similar reference to a "count" argument on line 222 in the same file (compression.py). Same fix, replace "count" with "identifier_length" and you're good to go.