FunKiiU
FunKiiU copied to clipboard
Run in background error?
Hi,
I'm trying to do the following command to run the downloads in the background
nohup python ./FunKiiU.py -title XXXXX -onlinetickets &> test.log
If I run python ./FunKiiU.py -title XXXXX -onlinetickets
everything is fine, but as soon as I launch i with nohup, I'm getting the following error in my log:
$ cat test.log
nohup: ignoring input
*******
FunKiiU 2.2 by cearp and the cerea1killer
*******
Downloading/updating data from wiiu.titlekeys.com
-Downloading titlekeys.json.
-File size is None.
-File in disk is 83944.
Downloaded data OK!
Traceback (most recent call last):
File "./FunKiiU.py", line 441, in <module>
tickets_only=arguments.tickets_only)
File "./FunKiiU.py", line 402, in main
process_title_id(title_id, title_key, name, region, output_dir, retry_count, onlinetickets, patch_demo, patch_dlc, simulate, tickets_only)
File "./FunKiiU.py", line 248, in process_title_id
log('Simulate: Would start work in in: "{}"'.format(rawdir))
File "./FunKiiU.py", line 426, in log
print(output.encode(sys.stdout.encoding, errors='replace'))
TypeError: encode() argument 1 must be string, not None
is there something wrong with the script?
What python version?
And that is strange... I have no idea about nohup or running this in the background.
But I'll search on google about it. Thanks for telling me.
ptyhon 2.7. It'd be great if this was compatible with nohup
Personally I have used screen and just detach when I ran the 3ds versions of this tool remotely, but nohup looks useful!
Quickly, it looks like these projects had a similar problem. I will see what they did.
https://github.com/ejwa/gitinspector/issues/19 https://github.com/ansible/ansible/issues/8644 https://github.com/aws/aws-cli/issues/1898
the use case for me is to launch the downloads after ssh into my raspberry pi, and forget about them even if I close the ssh connection
FYI - setting export PYTHONIOENCODING=utf-8
before running nohup works... Now just need to have that in the script
but that is something to do with the terminal/bash etc right? so, would it be right for FunKiiU to change that for the user?
good that it works though.
I think so could set it short lived for os.environ() during just the python program, in case that env variable doesn't exist ?
I'm having problems with "screen", it seems that when I dettach the screen (ctrol+a, d) the script freezes.