datashaman / putio-automator

A suite of commands for managing torrents, transfers and files on put.io. Works well with SickRage, Sonarr, etc.
MIT License
71 stars 17 forks source link

Account info fails with OAuth token #20

Closed tgianko closed 5 years ago

tgianko commented 6 years ago

Hi,

I wanted to try the newest changes in putio-automator and I cannot have it working. These are the steps I followed.

When I tested the connection with putio account info, I got this exception:

# putio account info 
Traceback (most recent call last):
  File "/usr/local/bin/putio", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/putio_automator/manage.py", line 47, in main
    manager.run()
  File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/usr/local/lib/python2.7/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/putio_automator/commands/account.py", line 17, in info
    print json.dumps(app.client.Account.info(), indent=4, default=date_handler)
  File "/usr/local/lib/python2.7/site-packages/putiopy.py", line 500, in info
    return cls.client.request('/account/info', method='GET')
  File "/usr/local/lib/python2.7/site-packages/putiopy.py", line 203, in request
    return _process_response(response)
  File "/usr/local/lib/python2.7/site-packages/putiopy.py", line 231, in _process_response
    raise exception_class(response, error_type, error_message)
putiopy.ClientError: GET, https://api.put.io/v2/account/info, 401, Unauthorized, u"The server could not verify that you are authorized to access the URL requested.  You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."

My first guess was that the OAuth token is wrong. I don't think so even though putio config show shows a different token (perhaps is just salted?).

I tried to reconfigure paying attention to type the right token and I got the same result.

tgianko commented 6 years ago

I tried the (I guess) 0.3-something version from a zip file found in the stable download page. The OAuth token works perfectly.

I guess the problem is in the new version.

MrSnuggles commented 6 years ago

I have the same issue. The 0.3 version is a pretty old one :( Did you find the config file? Maybe it is possible to change it yourself. Would love to be able to download in different download folders.

MrSnuggles commented 6 years ago

You can resolve the issue with installing it locally and not globally