posborne / putio-sync

Python daemon that automatically downloads files from put.io
MIT License
29 stars 12 forks source link

error trying to run putiosync #41

Closed krash1220 closed 7 years ago

krash1220 commented 7 years ago

Installed putio-sync with pip install putiosync did

$ putiosync -h

Traceback (most recent call last):
  File "/home/krash/.local/bin/putiosync", line 7, in <module>
    from putiosync.frontend import main
  File "/home/krash/.local/lib/python2.7/site-packages/putiosync/frontend.py", line 6, in <module>
    from putiosync.core import TokenManager, PutioSynchronizer, DatabaseManager
  File "/home/krash/.local/lib/python2.7/site-packages/putiosync/core.py", line 12, in <module>
    from putiosync import multipart_downloader
  File "/home/krash/.local/lib/python2.7/site-packages/putiosync/multipart_downloader.py", line 14, in <module>
    from requests import Request
  File "/home/krash/.local/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/home/krash/.local/lib/python2.7/site-packages/requests/utils.py", line 25, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/home/krash/.local/lib/python2.7/site-packages/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py", line 16, in <module>
    from .connectionpool import (
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 33, in <module>
    from .connection import (
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 41, in <module>
    from .util import (
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/__init__.py", line 5, in <module>
    from .response import is_fp_closed
  File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/response.py", line 4, in <module>
    from ..exceptions import HeaderParsingError
ImportError: cannot import name HeaderParsingError
krash1220 commented 7 years ago

Can someone help me please?

posborne commented 7 years ago

@krash1220 Trying pip install --reinstall requests and see if that helps.

krash1220 commented 7 years ago

Did you mean pip install --upgrade requests?

pip install --reinstall requests Usage:
pip install [options] [package-index-options] ... pip install [options] -r [package-index-options] ... pip install [options] [-e] ... pip install [options] [-e] ... pip install [options] <archive url/path> ...

krash1220 commented 7 years ago

pip install --upgrade requests takes me back to just download options putiosync -h positional arguments: download_directory Directory into which files should be downloaded

optional arguments: -h, --help show this help message and exit -k, --keep Keep files on put.io; do not automatically delete -p POLL_FREQUENCY, --poll-frequency POLL_FREQUENCY Polling frequency in seconds (default: 1 minute) -c POST_PROCESS_COMMAND, --post-process-command POST_PROCESS_COMMAND Command to be executed after the completion of every download. The command will be executed with the path to the file that has just been completed as an argument. Example: putio-sync -c 'python /path/to/postprocess.py' /path/to/Downloads

posborne commented 7 years ago

@krash1220 Good. That's what you should get with -h (h is for "help").

krash1220 commented 7 years ago

Is the -q watch folder option no longer there? I thought it was possible to upload torrents to putio with the -q option?

posborne commented 7 years ago

Yes, it should be there but may not be in the version currently published to PyPI. Try installing by doing pip install --upgrade git+https://github.com/posborne/putio-sync.git

krash1220 commented 7 years ago

pip install --upgrade git+https://github.com/posborne/putio-sync.git putiosync -h

Traceback (most recent call last): File "/home/krash/.local/bin/putiosync", line 9, in load_entry_point('putiosync==0.2.3', 'console_scripts', 'putiosync')() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/local/lib/python2.7/dist-packages/putiosync/frontend.py", line 9, in from pid import PidFile ImportError: No module named pid

posborne commented 7 years ago

@Pro This appears to be a regression you introduced with your most recent changes. Can you please ensure that the requirements.txt file is brought up to date?

krash1220 commented 7 years ago

Is there a requirement I can install in the mean time?

Pro commented 7 years ago

Fixed in PR. Use pip install pid

krash1220 commented 7 years ago

Okay, I did pip install pid

putiosync -h

Traceback (most recent call last): File "/home/krash/.local/bin/putiosync", line 9, in load_entry_point('putiosync==0.2.3', 'console_scripts', 'putiosync')() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/krash/.local/lib/python2.7/site-packages/putiosync/frontend.py", line 6, in import putio File "/home/krash/.local/lib/python2.7/site-packages/putio.py", line 9, in import requests File "/home/krash/.local/lib/python2.7/site-packages/requests/init.py", line 58, in from . import utils File "/home/krash/.local/lib/python2.7/site-packages/requests/utils.py", line 25, in from .compat import parse_http_list as _parse_list_header File "/home/krash/.local/lib/python2.7/site-packages/requests/compat.py", line 7, in from .packages import chardet File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/init.py", line 3, in from . import urllib3 File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/init.py", line 16, in from .connectionpool import ( File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 33, in from .connection import ( File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 41, in from .util import ( File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/init.py", line 4, in from .request import make_headers File "/home/krash/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/request.py", line 5, in from ..exceptions import UnrewindableBodyError ImportError: cannot import name UnrewindableBodyError

krash1220 commented 7 years ago

Never mind. I reinstalled everything and it is now working. Thank you so much.

krash1220 commented 7 years ago

putiosync -w /TV/Torrents /TV/Incomplete

I just can't win. Now, it won't download anything. It says There are no downloads in the queue currently It does upload my torrents but it won't download anything.

this runs and runs 2017-01-26 04:30:13,101 | werkzeug | INFO | 127.0.0.1 - - [26/Jan/2017 04:30:13] "GET /download_queue HTTP/1.1" 200 -

Pro commented 7 years ago

This output from werkzeug is because your browser is checking the download status, that's normal behaviour.

I'm using the following and it works fine: /usr/local/bin/python2 /mnt/scripts/putio-sync/putiosync/frontend.py --log "/mnt/scripts/putio.log" -p 600 /mnt/download

krash1220 commented 7 years ago

This doesn't even make sense to me first of all. I don't have a /usr/local/bin/python2 and I'm not sure why I would need to mount /mnt/scripts/putio-sync/putiosync or /mnt/scripts and I have no idea what -p 600 is.

/usr/local/bin/python2 /mnt/scripts/putio-sync/putiosync/frontend.py --log "/mnt/scripts/putio.log" -p 600 /mnt/download

I thought the command was putiosync -w /TV/Torrents /TV/Incomplete am I suppose to run python putiosync -w /TV/Torrents /TV/Incomplete When I run putiosync -w /TV/Torrents /TV/Incomplete a browser opens up and at the top it states There are no downloads in the queue currently and my /TV/Incomplete folder is empty even though I have quite a few torrents to download from Putio. I'm not sure what I'm doing wrong.

I'm not trying to be stupid here but I'm also not a programmer. I'm just trying to figure out why it is so difficult to get this program running correctly.