steamsync
steamsync copied to clipboard
UWPHook and SteamSync conflict
If a user has used UWPHook in the past, running SteamSync with --download-art
will fail:
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steamsync.py", line 652, in main
result, msg = add_games_to_shortcut_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steamsync.py", line 355, in add_games_to_shortcut_file
success = steamdb.download_art(user, game, should_replace_existing=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 292, in download_art
appid = self.guess_appid(game.display_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 203, in guess_appid
name = self._make_gamename_comparable(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 128, in _make_gamename_comparable
name = re_remove_hyphen.sub("", name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
This is because UWPHook ends up creating shortcuts that SteamSync finds that are bogus:
{'app_name': None,
'art_url': None,
'display_name': None, ## No Display Name so we blow up
'executable_path': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook\\UWPHook.exe"',
'icon': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook\\UWPHook.exe"',
'install_folder': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook',
'launch_arguments': '',
'shortcut_id': -1915271522,
'storetag': 'ignore tag',
'uri': None}
The solution is probably to either recognize these bogus entries and ignore them or to tell the user about it