Wintermute0110 / plugin.program.AEL.dev

Emulator frontend and app launcher for Kodi
GNU General Public License v2.0
105 stars 36 forks source link

Can't add some rom path #16

Closed mac1202 closed 8 years ago

mac1202 commented 8 years ago

Hi some rom path cannot be added for example if I set this path for my rom ~/Téléchargements/torrent/No-Intro/Nintendo - Nintendo 64/

I got this error

23:28:07 T:140391131113216   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/home/mac/.kodi/addons/plugin.program.advanced.emulator.launcher/addon.py", line 45, in <module>
                                                plugin.run_plugin()
                                              File "/home/mac/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/main.py", line 197, in run_plugin
                                                self._command_add_new_launcher(args['catID'][0])
                                              File "/home/mac/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/main.py", line 743, in _command_add_new_launcher
                                                fs_write_catfile(CATEGORIES_FILE_PATH, self.categories, self.launchers)
                                              File "/home/mac/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/disk_IO.py", line 295, in fs_write_catfile
                                                str_list.append(XML_text('rompath', launcher['rompath']))
                                              File "/home/mac/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/disk_IO.py", line 209, in XML_text
                                                line = '  <{0}>{1}</{2}>\n'.format(tag_name.encode('utf-8'), tag_text.encode('utf-8'), tag_name.encode('utf-8'))
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)
                                            -->End of Python script error report<--
Wintermute0110 commented 8 years ago

Another UnicodeError... this happens when using non-ASCII characters. Working on it now.

Wintermute0110 commented 8 years ago

I made a lot of changes in last commit to handle Unicode issues. Please try and report.

eggfoo commented 8 years ago

Ok. I'll test on my Windows 7 machine later tonight/tomorrow.

What am I testing for? Adding Roms/ online scrapping / JSON deletion bug? / Thanks

Wintermute0110 commented 8 years ago

All things you have mentioned are related to Unicode errors. Yeah, try everything a bit and see if everything works as expected. Also, currently scraper in Edit ROM and Edit Launcher is broken.

Also, are you the guy adding the ROMs one by one? If so, try using the scanner. Adding ROMs one by one is intended only for testing purposes (for example, you want to try a ROM not in the launcher ROMs directory). If you get the Unicode errors then in Settings change the scanner policy to not to use scrapers. That should do the job.

mac1202 commented 8 years ago

Fixed, thanks.