datashaman / putio-automator

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

putio config init error #9

Closed hanssep closed 7 years ago

hanssep commented 7 years ago

Found this project and trying to get it up and running. Keep running in to the following error:

Incomplete directory [incomplete]: /share/Download/Intermediate Downloads directory [downloads]: /share/Download Torrents directory [torrents]: /share/Download/torrent OAuth Token: XXXXXX Config file to write [/root/.local/share/putio-automator/config.py]: /root/.local/share/putio-automator/sickrage.py Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/Python/bin/putio", line 11, in sys.exit(main()) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/site-packages/putio_automator/manage.py", line 47, in main manager.run() File "/root/.local/lib/python2.7/site-packages/flask_script/init.py", line 412, in run result = self.handle(sys.argv[0], sys.argv[1:]) File "/root/.local/lib/python2.7/site-packages/flask_script/init.py", line 383, in handle res = handle(*args, *config) File "/root/.local/lib/python2.7/site-packages/flask_script/commands.py", line 216, in call return self.run(args, **kwargs) File "/share/CACHEDEV1_DATA/.qpkg/Python/lib/python2.7/site-packages/putio_automator/commands/config.py", line 56, in init with open(config_dist, 'r') as source: TypeError: <flask_script.commands.Command object at 0x7f70f2b68210>: coercing to Unicode: need string or buffer, NoneType found

This example is from my QNAP NAS but same happens on a standard Debian Linux VM. All locations are worldwide writeable.

krash1220 commented 7 years ago

I definitely don't have the answer but I'm just curious as to why you have a sickrage.py in Config file to write [/root/.local/share/putio-automator/config.py]: /root/.local/share/putio-automator/sickrage.py ?

hanssep commented 7 years ago

I tried to save the config under a different name but it doesn’t matter whether I change the config location/name or not. Same error. Seems like an argument is missing/invalid/wrong/null? -- Hans Sep

On March 25, 2017 at 11:26:56 AM, krash1220 (notifications@github.com) wrote:

I definitely don't have the answer but I'm just curious as to why you have a sickrage.py in Config file to write [/root/.local/share/putio-automator/config.py]: /root/.local/share/putio-automator/sickrage.py ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/datashaman/putio-automator/issues/9#issuecomment-289230133, or mute the thread https://github.com/notifications/unsubscribe-auth/ABz--FyF-qv6IW9lgu4J2EBZ0uxfvdBsks5rpVxvgaJpZM4MpJST .

hanssep commented 7 years ago

Found the error. If you install for all users 'putio config init' won't find etc/putio-automator/config.py.dist

datashaman commented 7 years ago

Thanks for the error report. Can you do me a favour and let me know where that .dist file is on your system (it may be under /usr/local or similar)? What OS/version are you using?

datashaman commented 7 years ago

It makes no sense for me to allow the editing of that filename. I'll change it to only display where it's saving it.

hanssep commented 7 years ago

If I do pip install putio-automator a putio-automator folder is created at ˜/.local/share with the db. Nothing else. No .dist anywhere on the system. If I do pip install --user putio-automator .dist and more is created at ˜/.local/share

cron410 commented 7 years ago

I ran pip install putio-automator and had the same error. I also ran pip install --user putio-automator" and still get the same error. My ~/.local/share/putio-automator/ only contains downloads.db and this was after adding the path to my .bashrc and logging off/back on.

datashaman commented 7 years ago

Hi there,

I've published a new release which fixes this issue:

https://github.com/datashaman/putio-automator/releases/tag/1.0.2

Please upgrade your installed package:

pip install --user --upgrade putio-automator

If you're using the system-wide installation:

sudo -H pip install --upgrade putio-automator

To create a config for your user only:

putio config init

To create a config for your site (the whole system, not recommended):

sudo -H putio config init --site

If you're using the Docker image, pull the latest application image:

putio docker pull
datashaman commented 7 years ago

I'll leave this issue open for a while for feedback. Please let me know if this works for you! Thanks! :gem:

datashaman commented 7 years ago

If you have tried running both system and user-specific installs, then you will have an executable putio at:

$HOME/.local/bin/putio

and:

/usr/local/bin/putio

This may cause some randomness in expected results. The paths might be different on different OSes. Use your system knowledge to figure out where those are and that you are running the expected one.

To be completely sure, I'd advise uninstalling the package:

pip uninstall putio-automator

and/or:

sudo -H pip uninstall putio-automator

Try uninstalling at least twice, till it complains it can't find the package.

Double-check you can't find a copy of putio:

which putio

should return nothing.

Then install the required version as per the usual method described in the README.