mtshrmn / horrible-downloader

horriblesubs.info python API and CLI
MIT License
29 stars 5 forks source link

Failed building wheel #8

Closed mariogarcc closed 5 years ago

mariogarcc commented 5 years ago

Sorry I cannot provide much more feedback - I have no idea what is happening here. I saw you were using Linux's command line, so I don't know if it doesn't work because I'm on Win10.

Processing c:\users\mario\program_files\horrible-downloader
Requirement already satisfied: beautifulsoup4>=4 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (4.7.1)
Requirement already satisfied: requests>=2 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (2.20.1)
Requirement already satisfied: lxml>=4 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (4.3.4)
Requirement already satisfied: sty>=1.0.0b9 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (1.0.0b11)
Requirement already satisfied: fuzzywuzzy>=0.16 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (0.17.0)
Requirement already satisfied: python-levenshtein>=0.12 in c:\users\mario\program_files\python3\lib\site-packages (from Horrible-Downloader==0.1.6) (0.12.0)
Requirement already satisfied: soupsieve>=1.2 in c:\users\mario\program_files\python3\lib\site-packages (from beautifulsoup4>=4->Horrible-Downloader==0.1.6) (1.9.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\mario\program_files\python3\lib\site-packages (from requests>=2->Horrible-Downloader==0.1.6) (2018.10.15)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\users\mario\program_files\python3\lib\site-packages (from requests>=2->Horrible-Downloader==0.1.6) (1.24.1)
Requirement already satisfied: idna<2.8,>=2.5 in c:\users\mario\program_files\python3\lib\site-packages (from requests>=2->Horrible-Downloader==0.1.6) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\mario\program_files\python3\lib\site-packages (from requests>=2->Horrible-Downloader==0.1.6) (3.0.4)
Requirement already satisfied: setuptools in c:\users\mario\program_files\python3\lib\site-packages (from python-levenshtein>=0.12->Horrible-Downloader==0.1.6) (40.6.3)
Building wheels for collected packages: Horrible-Downloader
  Building wheel for Horrible-Downloader (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\mario\program_files\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Mario\AppData\Local\Temp\pip-wheel-ovkkdlbg' --python-tag cp37
       cwd: C:\Users\Mario\AppData\Local\Temp\pip-req-build-fclkerys\
  Complete output (41 lines):
  Warning: 'classifiers' should be a list, got type 'tuple'
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\HorribleDownloader
  copying HorribleDownloader\config_manager.py -> build\lib\HorribleDownloader
  copying HorribleDownloader\parser.py -> build\lib\HorribleDownloader
  copying HorribleDownloader\__init__.py -> build\lib\HorribleDownloader
  running egg_info
  creating Horrible_Downloader.egg-info
  writing Horrible_Downloader.egg-info\PKG-INFO
  writing dependency_links to Horrible_Downloader.egg-info\dependency_links.txt
  writing requirements to Horrible_Downloader.egg-info\requires.txt
  writing top-level names to Horrible_Downloader.egg-info\top_level.txt
  writing manifest file 'Horrible_Downloader.egg-info\SOURCES.txt'
  reading manifest file 'Horrible_Downloader.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'Horrible_Downloader.egg-info\SOURCES.txt'
  copying HorribleDownloader\default_conf.ini -> build\lib\HorribleDownloader
  running build_scripts
  creating build\scripts-3.7
  copying bin\horrible-downloader -> build\scripts-3.7
  installing to build\bdist.win-amd64\wheel
  running install
  running install_lib
  creating build\bdist.win-amd64
  creating build\bdist.win-amd64\wheel
  creating build\bdist.win-amd64\wheel\HorribleDownloader
  copying build\lib\HorribleDownloader\config_manager.py -> build\bdist.win-amd64\wheel\.\HorribleDownloader
  copying build\lib\HorribleDownloader\default_conf.ini -> build\bdist.win-amd64\wheel\.\HorribleDownloader
  copying build\lib\HorribleDownloader\parser.py -> build\bdist.win-amd64\wheel\.\HorribleDownloader
  copying build\lib\HorribleDownloader\__init__.py -> build\bdist.win-amd64\wheel\.\HorribleDownloader
  running install_egg_info
  Copying Horrible_Downloader.egg-info to build\bdist.win-amd64\wheel\.\Horrible_Downloader-0.1.6-py3.7.egg-info
  running install_scripts
  creating build\bdist.win-amd64\wheel\Horrible_Downloader-0.1.6.data
  creating build\bdist.win-amd64\wheel\Horrible_Downloader-0.1.6.data\scripts
  copying build\scripts-3.7\horrible-downloader -> build\bdist.win-amd64\wheel\Horrible_Downloader-0.1.6.data\scripts
  error: [WinError 193] %1 is not a valid Win32 application
  ----------------------------------------
  ERROR: Failed building wheel for Horrible-Downloader
  Running setup.py clean for Horrible-Downloader
Failed to build Horrible-Downloader
Installing collected packages: Horrible-Downloader
  Found existing installation: horrible-downloader 0.1.6
    Uninstalling horrible-downloader-0.1.6:
      Successfully uninstalled horrible-downloader-0.1.6
  Running setup.py install for Horrible-Downloader ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\mario\program_files\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Mario\AppData\Local\Temp\pip-record-_yyxtqzv\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\Mario\AppData\Local\Temp\pip-req-build-fclkerys\
    Complete output (36 lines):
    Warning: 'classifiers' should be a list, got type 'tuple'
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\HorribleDownloader
    copying HorribleDownloader\config_manager.py -> build\lib\HorribleDownloader
    copying HorribleDownloader\parser.py -> build\lib\HorribleDownloader
    copying HorribleDownloader\__init__.py -> build\lib\HorribleDownloader
    running egg_info
    writing Horrible_Downloader.egg-info\PKG-INFO
    writing dependency_links to Horrible_Downloader.egg-info\dependency_links.txt
    writing requirements to Horrible_Downloader.egg-info\requires.txt
    writing top-level names to Horrible_Downloader.egg-info\top_level.txt
    reading manifest file 'Horrible_Downloader.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'Horrible_Downloader.egg-info\SOURCES.txt'
    copying HorribleDownloader\default_conf.ini -> build\lib\HorribleDownloader
    running build_scripts
    creating build\scripts-3.7
    copying bin\horrible-downloader -> build\scripts-3.7
    running install_lib
    creating c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader
    copying build\lib\HorribleDownloader\config_manager.py -> c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader
    copying build\lib\HorribleDownloader\default_conf.ini -> c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader
    copying build\lib\HorribleDownloader\parser.py -> c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader
    copying build\lib\HorribleDownloader\__init__.py -> c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader
    byte-compiling c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader\config_manager.py to config_manager.cpython-37.pyc
    byte-compiling c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader\parser.py to parser.cpython-37.pyc
    byte-compiling c:\users\mario\program_files\python3\Lib\site-packages\HorribleDownloader\__init__.py to __init__.cpython-37.pyc
    running install_egg_info
    Copying Horrible_Downloader.egg-info to c:\users\mario\program_files\python3\Lib\site-packages\Horrible_Downloader-0.1.6-py3.7.egg-info
    running install_scripts
    writing list of installed files to 'C:\Users\Mario\AppData\Local\Temp\pip-record-_yyxtqzv\install-record.txt'
    error: [WinError 193] %1 is not a valid Win32 application
    ----------------------------------------
  Rolling back uninstall of horrible-downloader
  Moving to c:\users\mario\program_files\python3\lib\site-packages\horrible_downloader-0.1.6-py3.7.egg-info
   from c:\users\mario\program_files\python3\lib\site-packages\~orrible_downloader-0.1.6-py3.7.egg-info
  Moving to c:\users\mario\program_files\python3\lib\site-packages\horribledownloader
   from c:\users\mario\program_files\python3\lib\site-packages\~orribledownloader
ERROR: Command errored out with exit status 1: 'c:\users\mario\program_files\python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mario\\AppData\\Local\\Temp\\pip-req-build-fclkerys\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Mario\AppData\Local\Temp\pip-record-_yyxtqzv\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
mtshrmn commented 5 years ago

I don't own a Windows machine, so I have no way to check for compatibility. I'll try to look into that in the near future.

mariogarcc commented 5 years ago

Now it does build the wheel, but at least in my case, the CLI doesn't recognize "horrible-downlaoder" as a command (PowerShell just opens the file). I don't know much about this, but upon inspection, the script that appears in the Scripts folder in the Python 3 folder is just two files (horrible-downloader and horrible-downloader.py) that are not .exe, compared to all the other scripts that appear there. I don't know if this is intended, as I said, but it's not working for me.

Also, those two files have something different between them on the line 75: the .py file has shell=True written, but the other one does not (again, don't know if intended or not).

Let me know if I can be of any assistance.

mtshrmn commented 5 years ago

I cannot address the issue until Thursday. I'll open the issue again but won't do anything untill then.

mtshrmn commented 5 years ago

Please delete the non .py file and try running it again. Note that I've added .py extension to my PATHEXT environment variable:

> set PathExt="%PathExt%;.PY"`

Just ran it using PowerShell and CMD, works both ways.

mariogarcc commented 5 years ago

I uninstalled everything, reinstalled again following instructions at the frontpage and it doesn't work. The only thing I managed to achieve was this, where if I set PathExt without the "" it recognizes it afterwards but I do have to do that everytime I start the CMD.

What this does is open the horrible-downloader.py file in Python3\Scripts\ (with my default code editor), and seems to do something afterwards as shown there in the commands.

C:\Users\Mario>set PathExt="%PathExt%;.PY"

C:\Users\Mario>horrible-downloader --help
'horrible-downloader' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Mario>set PathExt=%PathExt%;.PY

C:\Users\Mario>horrible-downloader --help

C:\Users\Mario>
 [main 2019-08-08T23:14:18.805Z] update#setState idle
[main 2019-08-08T23:14:48.809Z] update#setState checking for updates
[main 2019-08-08T23:14:48.897Z] update#setState downloading
mtshrmn commented 5 years ago

I'll try a different approach - compiling to exe. Hopefully this fixes the problem.

mtshrmn commented 5 years ago

Please check out the newest version, it's currently under the windows branch

mariogarcc commented 5 years ago

Seems to be working correctly! I did the following to install:

git clone https://github.com/jelomite/horrible-downloader.git
cd horrible-downloader
git checkout windows
pip install .

You may want to put that in some the readme or something if it is indeed the intended way to install it. I tried the example command horrible-downloader -d "one punch man" -e 1,2,4-6 -o ~/Videos/Anime and it started downloading to the current user \Videos\Anime folder (I didn't have that folder so it created it by itself). It seemed to be working but I stopped it because it was just for testing. I'll try and test this and other things like subscriptions tomorrow.

Thanks for your effort!

mtshrmn commented 5 years ago

The new fix is now pushed into master, which means you can now install it as it's written in the readme.

About the output directory - remember that ~/Videos/Anime is a Linux path. For Windows you should use something like C:\Users\<username>\.... You can also change this in the config file so you won't need to type it each time.