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

config init crashes #14

Closed Thinkscape closed 5 years ago

Thinkscape commented 7 years ago

Running off docker image:

# /usr/local/bin/putio config init
Incomplete directory [incomplete]: /files/incomplete
Downloads directory [downloads]: /files/downloads
Torrents directory [torrents]: /files/downloads
OAuth Token: SOMETOKEN
Traceback (most recent call last):
  File "/usr/local/bin/putio", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/putio_automator/manage.py", line 47, in main
    manager.run()
  File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/usr/local/lib/python2.7/dist-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/putio_automator/commands/config.py", line 56, in init
    with open(config_dist, 'r') as source:
TypeError: <flask_script.commands.Command object at 0x7eff1a9f1390>: coercing to Unicode: need string or buffer, NoneType found
Rick7C2 commented 6 years ago

I am having this problem aswell on ubuntu.

Traceback (most recent call last): File "/usr/local/bin/putio", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/putio_automator/manage.py", line 47, in main manager.run() File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 412, in run result = self.handle(sys.argv[0], sys.argv[1:]) File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 383, in handle res = handle(*args, **config) File "/usr/local/lib/python2.7/dist-packages/flask_script/commands.py", line 216, in __call__ return self.run(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/putio_automator/commands/config.py", line 56, in init with open(config_dist, 'r') as source: TypeError: <flask_script.commands.Command object at 0x7ffa39edebd0>: coercing to Unicode: need string or buffer, NoneType found

dcramer commented 6 years ago

This happens when the library is installed globally. FWIW --user isn't a common pattern. I was going to take a stab at fixing until I realized I could just install local and not worry about the problem.