appdailysales
appdailysales copied to clipboard
Custom filename format results in error
When I try to use the script like this:
appdailysales.py -a USERNAME -p PASSWORD -d 7 -f "%Y-%m-%d.txt.gz" -u -n
It produces this bunch of error message:
Traceback (most recent call last):
File "./kirbyt-appdailysales-eea5ce6/appdailysales.py", line 540, in <module>
sys.exit(main())
File "./kirbyt-appdailysales-eea5ce6/appdailysales.py", line 533, in main
downloadFile(options)
File "./kirbyt-appdailysales-eea5ce6/appdailysales.py", line 483, in downloadFile
os.makedirs(fileDirectory)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''
I don't speak Python much but as far as I can see the issue lies in the fact that in the following line (479 in the current version) fileDirectory
becomes an empty string. This path does not exist, neither can it be created.
fileDirectory = os.path.dirname(filename)
I tried commenting out the directory check and it works fine. When I add -o "./"
to the script call, it also works perfectly.
My guess is that it's just a missing "is empty" check on fileDirectory
, but I may be wrong.