jmriego / emulation

0 stars 0 forks source link

Traceback Error #4

Closed TonyBirt closed 4 years ago

TonyBirt commented 4 years ago

Hi Jmriego

Hope you are well where you are in these strange times. Had launchbox2ael.py running nicely until just a few days ago, not sure what might have changed in my Launchbox setup. Pasted copy of issue below, also do you have a paypal address I could donate for your work? Thanks Tony

C:\Launchbox2AEL>launchbox2ael.py Generating list of Sega CD games Generating list of Windows games Generating list of Atari Jaguar games Generating list of Super Nintendo Entertainment System games Generating list of Nintendo Switch games Generating list of Commodore Amiga games Generating list of 3DO Interactive Multiplayer games Generating list of Nintendo 64 games Generating list of Nintendo Wii U games Generating list of Nintendo Entertainment System games Generating list of Sega Dreamcast games Generating list of Sega 32X games Generating list of Sony Playstation 2 games Generating list of Nintendo Wii games Generating list of Sega Master System games Generating list of NEC TurboGrafx-16 games Generating list of Sega Genesis games Generating list of Sony Playstation games Generating list of Sega Saturn games Generating list of Atari 7800 games Generating list of Arcade games Generating list of Nintendo GameCube games Traceback (most recent call last): File "C:\Launchbox2AEL\LaunchBox2AEL.py", line 86, in categories, launchers = generate_data() File "C:\Launchbox2AEL\LaunchBox2AEL.py", line 28, in generate_data launchers = AELLaunchersCatalog(launchbox.games, DOSBOX_EXE, DOSBOX_ARGS, AELDIR) File "C:\Launchbox2AEL\ael\launcher.py", line 101, in init launcher = Launcher(game.platform, game.emulator, aeldir) File "C:\Launchbox2AEL\ael\launcher.py", line 22, in init ('categoryID', lb_platform.category.id), AttributeError: 'NoneType' object has no attribute 'id'

jmriego commented 4 years ago

They're definitely weird times. All good here but really looking forward to the end of the quarantine! That error looks like you don't have any category for GameCube and the program is complaining about that. If that's the case, I suppose I should add it to Non-Categorized platforms or something like that. Can you verify if that's really the case? In LaunchBox, choose from the dropdown for how to visualize your library something that should be called "Platform Categories" or similar

TonyBirt commented 4 years ago

One week into our 4 week Quarantine here in NZ, so just begun for us. Checked category, Gamecube was included in the Platform Console category. Tried removing Gamecube platform data and re-importing Gamecube games into Launchbox, got similar error.

C:\Launchbox2AEL>launchbox2ael.py Generating list of Sega CD games Generating list of Windows games Generating list of Atari Jaguar games Generating list of Super Nintendo Entertainment System games Generating list of Nintendo Switch games Generating list of Commodore Amiga games Generating list of 3DO Interactive Multiplayer games Generating list of Nintendo 64 games Generating list of Nintendo Wii U games Generating list of Nintendo Entertainment System games Generating list of Sega Dreamcast games Generating list of Sega 32X games Generating list of Sony Playstation 2 games Generating list of Nintendo Wii games Generating list of Sega Master System games Generating list of Sega Genesis games Generating list of NEC TurboGrafx-16 games Generating list of Sega Saturn games Generating list of Sony Playstation games Generating list of Atari 7800 games Generating list of Arcade games Generating list of Nintendo GameCube games Traceback (most recent call last): File "C:\Launchbox2AEL\LaunchBox2AEL.py", line 87, in write_files(categories, launchers) File "C:\Launchbox2AEL\LaunchBox2AEL.py", line 69, in write_files tree.write(f_rom_base_noext, pretty_print=True) File "src\lxml\etree.pyx", line 2057, in lxml.etree._ElementTree.write File "src\lxml\serializer.pxi", line 746, in lxml.etree._tofilelike File "src\lxml\serializer.pxi", line 813, in lxml.etree._create_output_buffer File "src\lxml\serializer.pxi", line 803, in lxml.etree._create_output_buffer FileNotFoundError: [Errno 2] No such file or directory

jmriego commented 4 years ago

Actually that error implies that the previous one was solved. You were not able to read the GameCube games, now you can't write the complete list to disk. Can you check what do you have in the config.ini as the AEL directory? It's complaining that directory does not exist

TonyBirt commented 4 years ago

Checked config.ini, AEL directory is correct. Tried re-installing Kodi and Launchbox but to no-avail. Could it be a Launcbox or Kodi update? thanks

jmriego commented 4 years ago

Can you send me the version of LaunchBox and Kodi you are using? I'll have a look at it this weekend.

Also, check where is the script trying to write exactly. It could be related to that. For detecting it, please edit the LaunchBox2AEL.py file and add a new line after this code: f_rom_base_noext = os.path.join(AELDIR, 'db_ROMs', '{}.xml'.format(launcher_ael['roms_base_noext']))

add a new line that says print(f_rom_base_noext) and comment here with the output so I can figure out this better

TonyBirt commented 4 years ago

Thanks, using the latest version of Launchbox (10.11) I think, Kodi 18.6.

Y:\Launchbox2AEL>launchbox2AEL.PY Generating list of Sega CD games Generating list of Windows games Generating list of Atari Jaguar games Generating list of Super Nintendo Entertainment System games Generating list of Nintendo Switch games Generating list of Commodore Amiga games Generating list of 3DO Interactive Multiplayer games Generating list of Nintendo 64 games Generating list of Nintendo Wii U games Generating list of Nintendo Entertainment System games Generating list of Sega Dreamcast games Generating list of Sega 32X games Generating list of Sony Playstation 2 games Generating list of Nintendo Wii games Generating list of Sega Master System games Generating list of NEC TurboGrafx-16 games Generating list of Sega Genesis games Generating list of Sony Playstation games Generating list of Sega Saturn games Generating list of Atari 7800 games Generating list of Arcade games Generating list of Nintendo GameCube games Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SegaCD(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AELWindows(Executables)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_AtariJaguar(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Super_Nintendo_EntertainmentSystem(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_NintendoSwitch(Yuzu)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_CommodoreAmiga(FS-UAE)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_3DO_InteractiveMultiplayer(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Nintendo64(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Nintendo_WiiU(Cemu)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Nintendo_EntertainmentSystem(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SegaDreamcast(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Sega32X(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Sony_Playstation2(PCSX2)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_NintendoWii(Dolphin)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Sega_MasterSystem(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_NECTurboGrafx-16(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SegaGenesis(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SonyPlaystation(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SegaSaturn(Mednafen)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_Atari7800(Retroarch)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AELArcade(MAME)_roms.xml Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_NintendoGameCube(Dolphin)_roms.xml Traceback (most recent call last): File "Y:\Launchbox2AEL\LaunchBox2AEL.py", line 87, in write_files(categories, launchers) File "Y:\Launchbox2AEL\LaunchBox2AEL.py", line 80, in write_files f = open(f_rom_base_noext, 'w') FileNotFoundError: [Errno 2] No such file or directory: 'Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\LB2AEL_SegaCD(Retroarch)_roms.json'

jmriego commented 4 years ago

sorry to answer to this now, but I noticed you asked me first about my paypal address: riegomachine@hotmail.com No need of course! :)

It's really strange, I was checking the logs and after you added that log line the error is happening in a different place. It was failing before when writing the xml files and now it's failing on the json files. I'm using the same versions of LaunchBox and Kodi than you so that shouldn't be the reason. There are two things that I can't make sense of. It's failing with a directory/file not found error but both xml and json files are written to the same place. Also, for some reason it's creating an xml file called LB2AEL_Sega_CD_(Retroarch)roms.xml but a json file called LB2AEL_Sega_CD(Retroarch)_roms.json. Notice the difference on the underscore position. This doesn't make sense because the code that creates these two names is exactly the same.

The only thing I can think of now would be to ask you to delete the Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\ folder, redownload or git pull this repo again and try again. Also, is there any chance the error is happening because the Y: folder is an external drive that gets randomly disconnected sometimes (explaining the 3 different places the code has failed) or the drive is full?

I'm more than happy to work with you on this and figure this out so if we can't find the reason I wouldn't even mind a screen share or something like that

TonyBirt commented 4 years ago

Sent through a little something to your Paypal (Tony Birt). Y:\Kodi Arctic Zephyr\portable_data\addons\plugin.program.advanced.emulator.launcher\db_ROMs\ The dbRoms folder doesn't exist for me when I go into plugin.program.advanced.emulator.launcher folder.

Also tried installing new version of Launchbox on a different internal Drive, reinstalled a new version of Kodi on that drive as well and started again but got same error.

TonyBirt commented 4 years ago

I tried uninstalling and reinstalling Advanced Emulator Launcher in Kodi. As well as deleting the plugin.program.advanced.emulator.launcher folder in Kodi directory and starting again.

jmriego commented 4 years ago

wow thanks a lot! it was really not necessary :)

That db_ROMs folder is created automatically by AEL the first time you run it. So the process for reinstalling everything would be installing Kodi and AEL and then opening AEL.

After you open AEL, the necessary folders would be created and then the script should work. If it doesn't, let me know and I'll let you know which files I'd need to test this

TonyBirt commented 4 years ago

Great, glad to help :) Tried uninstalling and re-installing AEL .9.7 - .9.8 and .9.9 - none create the db_roms folder after opening? Very strange.

jmriego commented 4 years ago

I'm really stuck trying to understand this. In my case I have just deleted the whole plugin.program.advanced.emulator.launcher and as soon as I open AEL again, it recreates db_ROMs and all the other folders

Maybe it's a problem with the folder permissions or you have two different Kodi installations? By the way, I have been using AEL 0.9.8 so that's probably the safest one for now. I also just installed 0.9.9 now and everything seems to working the same way

jmriego commented 4 years ago

could you go to your Kodi folder and attach the kodi.log file to see if there's anything strange in there?

TonyBirt commented 4 years ago

Attached log, thanks kodi.log

jmriego commented 4 years ago

I think I found the issue! I didn't find any error on the logs about AEL but at the top of the kodi.log you can find where the addons folder is located and it seems to be in a different place. Can you try editing the config.ini of this exporter script and changing the AEL folder to C:\Kodi Arctic Zephyr\portable_data\userdata\addon_data\plugin.program.advanced.emulator.launcher and let me know how it goes?

TonyBirt commented 4 years ago

That worked :) Thanks very much for your help.

jmriego commented 4 years ago

no worries! I'll make some changes to the code so that the error is clearer. Also, I'm adding collections to AEL, which will come from the Playlists in LaunchBox. I don't use them that much currently but could be helpful