bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
667 stars 124 forks source link

Arguments are ignored when executing the script directly #163

Closed sinfinite closed 5 years ago

sinfinite commented 5 years ago

i just downloaded Python 2.7.12 and tumblr utils tonight, and was trying to get it to run on my blog, but every time i try and execute the command, it gives me a "Missing blog-name error". i tried this with multiple blogs and tried using one of the commands but nothing works and i have no idea what the issue is. i've never used the command prompt or python before so i have no idea how to go about troubleshooting this... i've tried redownloading and installing both python and tumblr utils and i'm still getting the same issue. Any help would be appreciated.

C:\Users\Name\Desktop\Tumblr Backup\tumblr-utils-master>tumblr_backup.py blogname Usage: tumblr_backup.py [options] blog-name ...

tumblr_backup.py: error: Missing blog-name

cebtenzzre commented 5 years ago

Check that python is installed correctly with python -V. If it is not simply Python 2.7.12, try a clean uninstall and reinstall of Python.

The usual reason for this is a broken registry entry. A workaround would be to run the script explicitly via python (python path\to\tumblr_backup.py blogname).

The actual solution would be to check the following:

They should all be like "C:\Python27\python.exe" "%1" %* -- sometimes the %* is missing. If %* is missing, then arguments may not get passed to scripts. See this StackOverflow question.

sinfinite commented 5 years ago

image

(i'm terribly sorry, i have no experience with any of this stuff so if i'm being unbelievably stupid about something, please forgive me! i couldn't figure out how to get it to check the python version so i just uninstalled and reinstalled it.)

i did try checking the hkey values you mentioned, the first and second look fine (though the second is missing the %*), but the py_auto_file says it doesn't have a set value, and the commands under that look like they're set to open in notepad. Do i add a new key or string value with the python.exe part?

image

cebtenzzre commented 5 years ago

The installer should give you the option to add Python to your PATH. You can also do that manually by editing environment variables. You need to do that for any command starting with python to work properly.

cebtenzzre commented 5 years ago

If your HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command is missing the %*, then add it -- it's supposed to have it.

sinfinite commented 5 years ago

Oh, thank you! i finally got it to work! i really appreciate your help :)