Open bertoneone opened 7 years ago
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
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.
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
load_entry_point('pyminifier==2.1', 'console_scripts', 'pyminifier')()
File "/usr/local/lib/python3.5/dist-packages/pyminifier/pyminifier.py", line 302, in main
compression.zip_pack(pyz_file, options)
File "/usr/local/lib/python3.5/dist-packages/pyminifier/compression.py", line 222, in zip_pack
use_unicode=True, count=identifier_length
TypeError: obfuscation_machine() got an unexpected keyword argument 'count'
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!