liftoff / pyminifier

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

PermissionError when trying to minify a folder #117

Open AvielBlumenfeld opened 5 years ago

AvielBlumenfeld commented 5 years ago

Hi, I'm trying to simply minify a folder with some python files using the command: pyminifier --destdir=/minified_project c:\Projects\my_proj

I get the following error message:

Traceback (most recent call last): File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Projects\my_proj\venv\Scripts\pyminifier.exe__main__.py", line 9, in File "c:\projects\my_proj\venv\lib\site-packages\pyminifier\pyminifier.py", line 393, in main source = open(args[0]).read() PermissionError: [Errno 13] Permission denied: 'c:\Projects\my_proj'

I'm with: win10 python 3.6.5 pyminifier 2.1

I made sure no process is actually using this folder, python files are not read-only and I run cmd as admin.

By looking into the code of pyminifier.py on line 393, it seems like the arguments passed to the exe file weren't detected by parser.parse_args()