blawar / nut

GNU General Public License v3.0
1.09k stars 189 forks source link

[Bug] Issue loading ".py" version on ubuntu 20.04 #429

Closed DarkenLX closed 2 years ago

DarkenLX commented 2 years ago

Describe the bug cant get gui or cli to load on ubuntu 20.04 (linux) both run initially but self close with a traceback before it properly finishes loading

To Reproduce Steps to reproduce the behaviour:

  1. Open terminal
  2. run the "nut_gui.py" or "nut.py" via python3 (.py file name here) from the source tree cloned/saved directory after following (linux) guide on the main page
  3. get the little squirrel logo and titledb loading info
  4. wait for it to load but errors out

Actual behaviour crashes (im guessing) with traceback displayed in terminal Expected behaviour gui should show up or load and program window should be visible

Screenshots If applicable, add screenshots to help explain your problem.

NUT version (or git hash):

Additional context Terminal Output : downloading titledb files could not get title id from filename, name needs to contain [titleId] : titledb/db.nza unknown extension titledb/db.nza error getting tinfoil.io titledb: [Errno 13] Permission denied: 'titledb/AR.en.json' loaded titledb/BG.en.json in 0.16654962999928102 seconds
loaded titledb/BR.en.json in 0.10538952400020207 seconds loaded titledb/BR.pt.json in 0.12533159400027216 seconds loaded titledb/CH.fr.json in 0.21695107000050484 seconds loaded titledb/CH.de.json in 0.1297661729995525 seconds loaded titledb/CH.it.json in 0.1200205859995549 seconds loaded titledb/CY.en.json in 0.12025760500000615 seconds loaded titledb/EE.en.json in 0.22627060000013444 seconds loaded titledb/HR.en.json in 0.14297075200011022 seconds loaded titledb/IE.en.json in 0.11928075600008015 seconds loaded titledb/LT.en.json in 0.24355665700022655 seconds loaded titledb/LU.fr.json in 0.1384804819999772 seconds loaded titledb/LU.de.json in 0.12912988500011124 seconds loaded titledb/LV.en.json in 0.10953201700067439 seconds loaded titledb/MT.en.json in 0.2739077360001829 seconds loaded titledb/RO.en.json in 0.1169608079999307 seconds loaded titledb/SI.en.json in 0.11345260599955509 seconds loaded titledb/SK.en.json in 0.11470471200027532 seconds loaded titledb/CO.en.json in 0.0963893600001029 seconds loaded titledb/CO.es.json in 0.09893305199966562 seconds loaded titledb/AR.en.json in 0.29564995500004443 seconds loaded titledb/AR.es.json in 0.11586563399941952 seconds loaded titledb/CL.en.json in 0.048211022000032244 seconds loaded titledb/CL.es.json in 0.09561376100009511 seconds loaded titledb/PE.en.json in 0.08643253599984746 seconds loaded titledb/PE.es.json in 0.09906166699965979 seconds loaded titledb/KR.ko.json in 0.26979163699979836 seconds loaded titledb/HK.zh.json in 0.21923906799929682 seconds loaded titledb/CN.zh.json in 0.0022984329998507746 seconds loaded titledb/NZ.en.json in 0.3178512539998337 seconds loaded titledb/AT.de.json in 0.11810805200002505 seconds loaded titledb/BE.fr.json in 0.47577612300028704 seconds loaded titledb/BE.nl.json in 0.7754587859999447 seconds loaded titledb/CZ.en.json in 0.3906670420001319 seconds loaded titledb/DK.en.json in 0.3224043449999954 seconds loaded titledb/ES.es.json in 0.760514585999772 seconds loaded titledb/FI.en.json in 0.307893227999557 seconds loaded titledb/GR.en.json in 0.1657460030000948 seconds loaded titledb/HU.en.json in 0.3152735510002458 seconds loaded titledb/NL.nl.json in 0.3272930899993298 seconds loaded titledb/NO.en.json in 0.18469211699994048 seconds loaded titledb/PL.en.json in 0.8228121879992614 seconds loaded titledb/PT.pt.json in 0.19575768699996843 seconds loaded titledb/RU.ru.json in 0.8942414719995213 seconds loaded titledb/ZA.en.json in 0.2998907589999362 seconds loaded titledb/SE.en.json in 0.15959472399936203 seconds loaded titledb/MX.en.json in 0.3040254580000692 seconds loaded titledb/MX.es.json in 0.998199208999722 seconds loaded titledb/IT.it.json in 0.1867248139997173 seconds loaded titledb/CA.en.json in 0.3289154960002634 seconds loaded titledb/CA.fr.json in 0.3909335339994868 seconds loaded titledb/FR.fr.json in 0.3932109600000331 seconds loaded titledb/DE.de.json in 0.32847729600052844 seconds loaded titledb/JP.ja.json in 0.6015047179998874 seconds loaded titledb/AU.en.json in 1.1589755969998805 seconds loaded titledb/GB.en.json in 0.31804312100030074 seconds loaded titledb/US.en.json in 0.318896617000064 seconds loaded titledb/US.es.json in 0.3484809960000348 seconds loaded titledb/demos.txt in 0.03474272600033146 seconds loaded titledb/ranks.txt in 0.9827195970001412 seconds loaded titledb/versions.txt in 0.9823928310006522 seconds Traceback (most recent call last): File "nut_gui.py", line 67, in run() File "nut_gui.py", line 44, in run nut.initTitles() File "/home/louis/nutsrc/nut/nut/init.py", line 627, in initTitles updateTitleDb() File "/home/louis/nutsrc/nut/nut/init.py", line 617, in updateTitleDb importRegion(Config.region, Config.language) File "/home/louis/nutsrc/nut/nut/init.py", line 521, in importRegion Titles.save() File "/home/louis/nutsrc/nut/nut/Titles.py", line 320, in save nut.writeJson(j, fileName) File "/home/louis/nutsrc/nut/nut/init.py", line 1607, in writeJson os.unlink(fileName) FileNotFoundError: [Errno 2] No such file or directory: 'titledb/titles.json'

DarkenLX commented 2 years ago

Hopefully somebody can tell me whats going wrong if any other information is needed i will try to provide it if i can.

DarkenLX commented 2 years ago

hmm looks like one file is missing, so it can't generate titles.json can you try getting 'titledb/AR.en.json' from https://github.com/blawar/titledb

strange because that file is there in the titledb folder (8.6MB size) Hashes: MD5: db874401a3cb51b285bf8f653992d3a3 SHA1: c18284f34e8367aa0ccd207926dac70c938380a1

so it seems the hashes are different from the one you suggested (below). the one i have is from the nut source master branch here.. should the hashes be different from the two? Suggested file hashes: MD5: c1baf05d9bfcd3cdf453f3b55b658b30 SHA1: ec0195942e04c10cf4b90bb9539232033635192e

DarkenLX commented 2 years ago

still crashing.. terminal output: python3 nut_gui.py loading blacklist /home/louis/nutsrc/nut/conf/blacklist.online.txt loaded user guest

downloading titledb files could not get title id from filename, name needs to contain [titleId] : titledb/db.nza unknown extension titledb/db.nza loaded titledb/BG.en.json in 0.17521982499965816 seconds loaded titledb/BR.en.json in 0.13264092299868935 seconds loaded titledb/BR.pt.json in 0.14266663300077198 seconds loaded titledb/CH.fr.json in 0.24588169700291473 seconds loaded titledb/CH.de.json in 0.149769957002718 seconds loaded titledb/CH.it.json in 0.1457255979985348 seconds loaded titledb/CY.en.json in 0.14009901999816066 seconds loaded titledb/EE.en.json in 0.22533617699809838 seconds loaded titledb/HR.en.json in 0.13566235800317372 seconds loaded titledb/IE.en.json in 0.14205609499913407 seconds loaded titledb/LT.en.json in 0.2624599149967253 seconds loaded titledb/LU.fr.json in 0.1652271640014078 seconds loaded titledb/LU.de.json in 0.1456879420002224 seconds loaded titledb/LV.en.json in 0.13453031800236204 seconds loaded titledb/MT.en.json in 0.3164007190025586 seconds loaded titledb/RO.en.json in 0.13509381900075823 seconds loaded titledb/SI.en.json in 0.13693898200290278 seconds loaded titledb/SK.en.json in 0.1390729669983557 seconds loaded titledb/CO.en.json in 0.08283055300125852 seconds loaded titledb/CO.es.json in 0.09686371300267638 seconds loaded titledb/AR.en.json in 0.31235758700131555 seconds loaded titledb/AR.es.json in 0.11778005999804009 seconds loaded titledb/CL.en.json in 0.04865724199771648 seconds loaded titledb/CL.es.json in 0.10053552700264845 seconds loaded titledb/PE.en.json in 0.08546761999969021 seconds loaded titledb/PE.es.json in 0.09994939799798885 seconds loaded titledb/KR.ko.json in 0.24152307099939208 seconds loaded titledb/HK.zh.json in 0.2294249740007217 seconds loaded titledb/CN.zh.json in 0.002067432000330882 seconds loaded titledb/NZ.en.json in 0.30800613799874554 seconds loaded titledb/AT.de.json in 0.14999506199819734 seconds loaded titledb/BE.fr.json in 0.4545603869992192 seconds loaded titledb/BE.nl.json in 0.6929812150010548 seconds loaded titledb/CZ.en.json in 0.3583735139982309 seconds loaded titledb/DK.en.json in 0.35188846299934085 seconds loaded titledb/ES.es.json in 0.8124992170014593 seconds loaded titledb/FI.en.json in 0.3850606179985334 seconds loaded titledb/GR.en.json in 0.2041624330013292 seconds loaded titledb/HU.en.json in 0.36256878200219944 seconds loaded titledb/NL.nl.json in 0.34046108899929095 seconds loaded titledb/NO.en.json in 0.2062678149995918 seconds loaded titledb/PL.en.json in 0.8244400509975094 seconds loaded titledb/PT.pt.json in 0.19983725699785282 seconds loaded titledb/RU.ru.json in 0.8115305469982559 seconds loaded titledb/ZA.en.json in 0.3080845260010392 seconds loaded titledb/SE.en.json in 0.1613992920028977 seconds loaded titledb/MX.en.json in 0.38503840600242256 seconds loaded titledb/MX.es.json in 1.0397696559994074 seconds loaded titledb/IT.it.json in 0.21436159599761595 seconds loaded titledb/CA.en.json in 0.38336622299902956 seconds loaded titledb/CA.fr.json in 0.4555526610020024 seconds loaded titledb/FR.fr.json in 0.4523140549972595 seconds loaded titledb/DE.de.json in 0.40908469399801106 seconds loaded titledb/JP.ja.json in 0.7017237660002138 seconds loaded titledb/AU.en.json in 1.1743635820021154 seconds loaded titledb/GB.en.json in 0.3709659849992022 seconds loaded titledb/US.en.json in 0.38308872699781205 seconds loaded titledb/US.es.json in 0.4155184020019078 seconds loaded titledb/demos.txt in 0.035604377000709064 seconds loaded titledb/ranks.txt in 0.7152385810004489 seconds loaded titledb/versions.txt in 0.9773075199991581 seconds error getting tinfoil.io titledb: [Errno 2] No such file or directory: 'titledb/titles.json' loaded titledb/demos.txt in 0.029037469998002052 seconds
loaded titledb/ranks.txt in 0.8659829460011679 seconds loaded titledb/versions.txt in 1.2365156209998531 seconds Traceback (most recent call last): File "nut_gui.py", line 67, in run() File "nut_gui.py", line 44, in run nut.initTitles() File "/home/louis/nutsrc/nut/nut/init.py", line 627, in initTitles updateTitleDb() File "/home/louis/nutsrc/nut/nut/init.py", line 617, in updateTitleDb importRegion(Config.region, Config.language) File "/home/louis/nutsrc/nut/nut/init.py", line 521, in importRegion Titles.save() File "/home/louis/nutsrc/nut/nut/Titles.py", line 320, in save nut.writeJson(j, fileName) File "/home/louis/nutsrc/nut/nut/init.py", line 1607, in writeJson os.unlink(fileName) FileNotFoundError: [Errno 2] No such file or directory: 'titledb/titles.json'

DarkenLX commented 2 years ago

side note: i tried starting from scratch in a new empty directory with a fresh download of the source just in case the original (which i backed up before attempting) was foobar has same exact error result. not sure if that would mean much.. beyond the obvious "something is broke" lol

DarkenLX commented 2 years ago

Anyone (preferably someone involved in development) able to reproduce this? Or even know what the cause is?

blawar commented 2 years ago

pull master and try again @DarkenLX

DarkenLX commented 2 years ago

pull master and try again @DarkenLX

Fixed with #429 thanks