Hacking A simple GUI for FunKiiU "FunKii-UI"

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
When I try to run it on Windows, I just see command line that automatically closes.
When I originally run it, it'll prompt me for URL, but after I enter that every tab is blank. Can someone help

Close the program and re open it. Its because I load titles and sizes before populating the window. It basically assumes that you already have a titlekeys.json file. Its more like a bug in how I approach program startup. Enter the key site on the welcome tab and it will download the json file you need. Close and re open the program and everything should work. I realized this was the case just last night so I will re think how I start the program in the next release to avoid this issue. Sorry for the confusion.
 

stuckfugu

Member
Newcomer
Joined
Feb 20, 2007
Messages
22
Trophies
0
XP
300
Country
Canada
Close the program and re open it. Its because I load titles and sizes before populating the window. It basically assumes that you already have a titlekeys.json file. Its more like a bug in how I approach program startup. Enter the key site on the welcome tab and it will download the json file you need. Close and re open the program and everything should work. I realized this was the case just last night so I will re think how I start the program in the next release to avoid this issue. Sorry for the confusion.
When I reopen it, I just see command line do some stuff, then it just closes
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
When I reopen it, I just see command line do some stuff, then it just closes
Can you run the program in IDLE so I can see the error? Instead of double clicking gui.py, right click it instead and choose Edit in IDLE. Once open press f5 to run it. When it crashes the IDLE window will stay open and there will be whats called a stack trace error message. Copy and paste that over here. Other people, German users, have had connection issues regarding SSL, also, so there are many things that could be happening. I guarantee I will sort it out for you if you can help me track the problem.
 
Last edited by dojafoja,

stuckfugu

Member
Newcomer
Joined
Feb 20, 2007
Messages
22
Trophies
0
XP
300
Country
Canada
Thanks for the reply
This is what I get:

Code:
Checking for program updates, this might take a few seconds.......

Downloading/updating data from -nope-
-Downloading titlekeys.json.
-File size is None.
-File in disk is 200780.
DONE....Downloaded titlekeys.json succesfully
Now parsing titlekeys.json
0 Titles did not load correctly.
Succesfully populated the selection box..


Size informataion database is out of sync with titlekeys.json.

Updating size information database now.....


Traceback (most recent call last):
  File "C:\Wii U\FunKii\gui.py", line 934, in <module>
    root=RootWindow()
  File "C:\Wii U\FunKii\gui.py", line 353, in __init__
    self.build_database()
  File "C:\Wii U\FunKii\gui.py", line 390, in build_database
    if not fnku.download_file(baseurl + '/tmd', 'title.tmd', 1):
  File "C:\Wii U\FunKii\FunKiiU.py", line 109, in download_file
    infile = urlopen(url)
  File "C:\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python27\lib\urllib2.py", line 429, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 447, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1201, in do_open
    r = h.getresponse(buffering=True)
  File "C:\Python27\lib\httplib.py", line 1136, in getresponse
    response.begin()
  File "C:\Python27\lib\httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "C:\Python27\lib\httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "C:\Python27\lib\socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 10054] An existing connection was forcibly closed by the remote host
>>>
 
Last edited by raulpica,

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
Thanks for the reply
This is what I get:

Code:
Checking for program updates, this might take a few seconds.......

Downloading/updating data from xxx.xxxxx.com
-Downloading titlekeys.json.
-File size is None.
-File in disk is 200780.
DONE....Downloaded titlekeys.json succesfully
Now parsing titlekeys.json
0 Titles did not load correctly.
Succesfully populated the selection box..


Size informataion database is out of sync with titlekeys.json.

Updating size information database now.....


Traceback (most recent call last):
  File "C:\Wii U\FunKii\gui.py", line 934, in <module>
    root=RootWindow()
  File "C:\Wii U\FunKii\gui.py", line 353, in __init__
    self.build_database()
  File "C:\Wii U\FunKii\gui.py", line 390, in build_database
    if not fnku.download_file(baseurl + '/tmd', 'title.tmd', 1):
  File "C:\Wii U\FunKii\FunKiiU.py", line 109, in download_file
    infile = urlopen(url)
  File "C:\Python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python27\lib\urllib2.py", line 429, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 447, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1201, in do_open
    r = h.getresponse(buffering=True)
  File "C:\Python27\lib\httplib.py", line 1136, in getresponse
    response.begin()
  File "C:\Python27\lib\httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "C:\Python27\lib\httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "C:\Python27\lib\socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 10054] An existing connection was forcibly closed by the remote host
>>>
I'm going to see what I can do, in the meantime you should really edit your post and remove the name of that title key site. It's not allowed to post it here.
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
Not yet
Thanks!
Do you know what the issue is?
I honestly haven't had time to look much yet. It is downloading the .json from the key site just fine. Then it fails to connect to Nintendo's servers. It could be some kind of timeout issue, not sure. Just to be sure, your not blocking Nintendo on your router are you. If you are, try to not do it globally and create special rules just for your WiiU if possible. Or unplug your WiiU if you are paranoid and unblock any servers from N that you might be blocking and try again.
 

stuckfugu

Member
Newcomer
Joined
Feb 20, 2007
Messages
22
Trophies
0
XP
300
Country
Canada
Not yet

I honestly haven't had time to look much yet. It is downloading the .json from the key site just fine. Then it fails to connect to Nintendo's servers. It could be some kind of timeout issue, not sure. Just to be sure, your not blocking Nintendo on your router are you. If you are, try to not do it globally and create special rules just for your WiiU if possible. Or unplug your WiiU if you are paranoid and unblock any servers from N that you might be blocking and try again.

Yup, that's exactly what I did. It appears to be working now. Thanks for your help!
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
Today I noticed some strange titles being parsed from titlekeys.json. They weren't being categorized by my app properly because they didn't match the typical convention of the 8th digit in the title id being either 0,e,c for games/updates/dlc. Instead the 8th digit is a 2. I dug deeper and found that they are all demo titles. I will update my app and push out yet another release really soon. @cearp were you aware of the demo titles being defined by a 2 instead of the usual 0,e,or c? I just found it strange that nobody has classified it yet.
 

YureiKohi

New Member
Newbie
Joined
Dec 1, 2016
Messages
1
Trophies
0
Age
30
XP
41
Country
I have a small problem with the GUI. The welcome screen, where it asks you to put in "thatkeysite", tells me I put in the wrong one (in the console). Is "thatkeysite" actually specific?
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
I have a small problem with the GUI. The welcome screen, where it asks you to put in "thatkeysite", tells me I put in the wrong one (in the console). Is "thatkeysite" actually specific?
You need to know the actual name of a specific web site that hosts all the title keys. It is well known and easy to find if you search for it.
 

MattKimura

3DS & WiiU Enthusiast
Member
Joined
Jun 30, 2014
Messages
2,137
Trophies
1
XP
2,937
Country
United States
@dojafoja The refresh button will be useless if you force the program to automatically refresh while it's starting up, while checking for updates. Just a little bit more noob friendliness this way.
 
  • Like
Reactions: dojafoja

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
@dojafoja The refresh button will be useless if you force the program to automatically refresh while it's starting up, while checking for updates. Just a little bit more noob friendliness this way.
This is starting to get used more and more by noobs so that makes sense. I sometimes leave in old features as things mature so it's good to hear what the users feel is useless. Also, I took your suggestion and I've reduced it down to a single download button and added behavior options. Content with a legit ticket will land in a folder called LEGIT and content with a fake ticket will land in a folder called FAKE. I also added an option to add the entire selection menu to the download list based on all the filtered selections. This will be like a more powerful form of the -regions option. Would you mind giving it a quick test before I send it out in the wild? I will be home in a couple hours and I can send you a link to try it out. I've gotten a ton of traffic from YouTube lately on my github so I know there must be some tutorials out there using my app. I need to make it as noob friendly as possible to keep error reporting down. Thanks again for supporting FunKii-UI and everything I put into this.
 

MattKimura

3DS & WiiU Enthusiast
Member
Joined
Jun 30, 2014
Messages
2,137
Trophies
1
XP
2,937
Country
United States
This is starting to get used more and more by noobs so that makes sense. I sometimes leave in old features as things mature so it's good to hear what the users feel is useless. Also, I took your suggestion and I've reduced it down to a single download button and added behavior options. Content with a legit ticket will land in a folder called LEGIT and content with a fake ticket will land in a folder called FAKE. I also added an option to add the entire selection menu to the download list based on all the filtered selections. This will be like a more powerful form of the -regions option. Would you mind giving it a quick test before I send it out in the wild? I will be home in a couple hours and I can send you a link to try it out. I've gotten a ton of traffic from YouTube lately on my github so I know there must be some tutorials out there using my app. I need to make it as noob friendly as possible to keep error reporting down. Thanks again for supporting FunKii-UI and everything I put into this.
Awesome, this is my personal favorite app to use, it's easier to use especially now with all the improvements you add to it. I personally have it in my guide and always update it when there's a new release. This is the reason why I think noob friendliness is important, it can be a pain to have to explain certain things.
Sure I'll test it for you, leave it here with me : p

Edit: My friend wants to know if download pausing is possible. That would actually be huge, but I doubt it's possible since it does it's downloading within command prompt/terminal. Unless the GUI can control the download. But when something is downloading, the GUI says "not responding" and I'm only able to watch the download in the command line window
 
Last edited by MattKimura,

datahoarder

Organized.
Member
Joined
Jul 7, 2007
Messages
567
Trophies
1
XP
750
Country
United States
-snip- I was planning on adding a bulk selection or add all button based off filter selections. The problem with doing that is some have tickets and some dont, some have keys and others don't. I thought it might give a quick glance check at which ones might not allow for using the keys method to download. I think I will just implement some default behavior choices so the user can choose how to handle bulk downloads. Maybe get the legit ticket if it exists and use keys if not but I would need a CLEAR method for the user to be able to distinguish between the two in their library. -snip-

So, there will be a bulk download option being added soon?
Is there a way I can just copy and paste a bulk titleid list into that "list" box
and have it create tickets for whatever has a matching key pairing on that website\the json?
 
  • Like
Reactions: dojafoja

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
So, there will be a bulk download option being added soon?
Is there a way I can just copy and paste a bulk titleid list into that "list" box
and have it create tickets for whatever has a matching key pairing on that website\the json?
Not a bad idea, in fact someone else also suggested something like importing a txt file list of titles or something similar.
Unfortunately I don't think I can implement a copy/paste solution right into the box because I'm working with Tkinter which is a fairly limited GUI toolkit and I don't think the list box supports pasting. Sometimes you have to get real clever using this toolkit to produce complex UI's. Anyway, it would be pretty easy to add something like importing a text file containing title ids on each line to auto add it in. I've got the behavior all worked out as far as downloading legit tickets when they exist and generating/ignoring ones that don't depending on user choice. There is also already a Tickets only option in the Options tab that, when set, will ONLY obtain tickets. So if you are ONLY looking for tickets and not to download the content then this can already be done. Add the title into the download list, set tickets only mode in the options and click download. This will only obtain/generate tickets without downloading the content. I think I will definitely add an option to import from an external file of titles.
 

dojafoja

life elevated
OP
Member
Joined
Jan 2, 2014
Messages
696
Trophies
1
XP
2,608
Country
Awesome, this is my personal favorite app to use, it's easier to use especially now with all the improvements you add to it. I personally have it in my guide and always update it when there's a new release. This is the reason why I think noob friendliness is important, it can be a pain to have to explain certain things.
Sure I'll test it for you, leave it here with me : p

Edit: My friend wants to know if download pausing is possible. That would actually be huge, but I doubt it's possible since it does it's downloading within command prompt/terminal. Unless the GUI can control the download. But when something is downloading, the GUI says "not responding" and I'm only able to watch the download in the command line window
Ok I'm gonna work on a few extra details before I send it your way for testing. Expect it some time tomorrow. As far as pausing the download, that would be huge. Basically once I send the right data over to FunKiiU's process_title_id() function it enters into a closed loop to parse and download the content. The GUI is also running in a closed loop on the same process so when you have a loop run inside of a loop you lose control of the non active loop if that makes any sense. I could do it in a multiprocess and the GUI would remain responsive but it wouldn't do any good without a pause/resume feature. The biggest problem is that FunKiiU is doing the downloading and not my app. I can't really do much to control it's code unless I patched his function to support it from inside my app. It's doable just not very easy. Although I've been wanting to patch his process_title_id() or send a pull request to get a couple things changed. His process_title_id() doesn't return True on a successful title download, it returns None either way so I don't really even have a way of knowing if a download was successful or not. That would be good info to know so I can notify the user of bad downloads and also maybe implement some plain text logging into a log file.
 
  • Like
Reactions: MattKimura

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/sGvT5FKSiyk?si=TYqsdjjbF-4N8Xc8