posborne / putio-sync

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

No longer traversing folder structure on put box #39

Closed domainzero closed 7 years ago

domainzero commented 7 years ago

Running into some new issues, trying to confirm if this is an issue on the put.io side or if something randomly broke for me. It looks like putiosync can no longer traverse all the way down existing folder structures that I have had on my put.io box (ex. Your Files > TV > Downloaded) but can download from one directory up (ex. Your Files > TV)

Attempting to download anything outside of root directory or one directory down:

2016-11-15 19:44:44,094 | putiosync    | ERROR    | Unexpected error while performing check/download
Traceback (most recent call last):
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 194, in _perform_single_check
    self._queue_download(putio_file)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 188, in _queue_download
    self._queue_download(child, os.path.join(relpath, putio_file.name), level + 1)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 188, in _queue_download
    self._queue_download(child, os.path.join(relpath, putio_file.name), level + 1)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 180, in _queue_download
    self._do_queue_download(putio_file, target_dir, delete_after_download=(not self._keep_files))
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 149, in _do_queue_download
    pbar = progressbar.ProgressBar(widgets=widgets, maxval=total)
  File "/usr/local/lib/python2.7/site-packages/progressbar.py", line 213, in __init__
    assert maxval > 0
AssertionError

Downloading a file in the root directory, note the same error as it tries to traverse down to Your Files > TV > Dwonloaded, but is able to download something from the root directory (Your Files).

I moved a file from Your Files > TV > Downloaded into the root directory and it started downloading immediately.

2016-11-15 19:47:45,937 | putiosync    | ERROR    | Unexpected error while performing check/download
Traceback (most recent call last):
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 194, in _perform_single_check
    self._queue_download(putio_file)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 188, in _queue_download
    self._queue_download(child, os.path.join(relpath, putio_file.name), level + 1)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 188, in _queue_download
    self._queue_download(child, os.path.join(relpath, putio_file.name), level + 1)
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 180, in _queue_download
    self._do_queue_download(putio_file, target_dir, delete_after_download=(not self._keep_files))
  File "build/bdist.freebsd-10.3-STABLE-amd64/egg/putiosync/core.py", line 149, in _do_queue_download
    pbar = progressbar.ProgressBar(widgets=widgets, maxval=total)
  File "/usr/local/lib/python2.7/site-packages/progressbar.py", line 213, in __init__
    assert maxval > 0
AssertionError
2016-11-15 19:47:46,102 | requests.packages.urllib3.connectionpool | DEBUG    | "GET /v2/files/435728335/download?oauth_token=BEP7F6OQ HTTP/1.1" 302 615
2016-11-15 19:47:46,105 | requests.packages.urllib3.connectionpool | INFO     | Starting new HTTPS connection (1): cha3.put.io
2016-11-15 19:47:46,997 | requests.packages.urllib3.connectionpool | DEBUG    | "GET /download/435728335?tunnel=1&storage=s15&token=c8d2777a2e9d11e699d702fcbddb47f1&u=mJmonWpfXJlhWlSgmqhbmZ9nXWVVVl%2BJmaNiYGJVYFRYaVZjZWliXFZiXldoXmZkZmJbjJmJ&attachment=1 HTTP/1.1" 206 8382256
2016-11-15 19:48:00,426 | putiosync.webif.transmissionrpc | INFO     | Method: u'torrent-get', Arguments: {u'fields': [u'id', u'hashString', u'name', u'downloadDir', u'status', u'totalSize', u'leftUntilDone', u'isFinished', u'eta', u'errorString']}
2016-11-15 19:48:00,427 | putiosync.webif.transmissionrpc | INFO     | EnvironHeaders([('Authorization', u'Basic Og=='), ('Content-Length', u'251'), ('User-Agent', u'Sonarr/2.0.0.4370 (Linux 10.3)'), ('Connection', u'close'), ('Host', u'10.0.0.22:7001'), ('Accept', u'application/json'), ('X-Transmission-Session-Id', u'b1f94d80-a823-11e6-8eea-0697c0e589a3'), ('Content-Type', u'application/json'), ('Accept-Encoding', u'gzip')])
2016-11-15 19:48:00,428 | putio        | DEBUG    | url: https://api.put.io/v2/transfers/list
2016-11-15 19:48:00,588 | requests.packages.urllib3.connectionpool | DEBUG    | "GET /v2/transfers/list?oauth_token=BEP7F6OQ HTTP/1.1" 200 39
2016-11-15 19:48:00,589 | putio        | DEBUG    | response: <Response [200]>
2016-11-15 19:48:00,589 | putio        | DEBUG    | content: {
  "status": "OK",
  "transfers": []
}
2016-11-15 19:48:00,590 | werkzeug     | INFO     | 10.0.0.21 - - [15/Nov/2016 19:48:00] "POST /transmission/rpc HTTP/1.0" 200 -
100% |##############################################| Time: 00:00:22 365.96 K/s
Downloading filename

This was working previously, so I'm leaning toward this being a put.io issue. Has this issue happened to anyone else yet/can it be reproduced?

domainzero commented 7 years ago

ALRIGHT, I guess that wasn't real the issue. I had a 0 kb placeholder file in one of my directories and I guess putiosync was just crashing when it went to download it.

Removed that file and everything is good for now.