Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam Importer Hangs on FileNotFoundError #102

Closed
NotYourAlejandro opened this issue May 27, 2023 · 6 comments
Closed

Steam Importer Hangs on FileNotFoundError #102

NotYourAlejandro opened this issue May 27, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@NotYourAlejandro
Copy link

Describe the bug
When running the steam importer, the loading bar hangs, and the application logs show that a FileNotFoundError occurs. The program hangs on a single occurrence. This occurs when a path mentioned in Steam's libraryfolders.vdf does not exist anymore.

Traceback (most recent call last):
  File "/app/share/cartridges/cartridges/main.py", line 162, in on_import_action
    steam_importer()
  File "/app/share/cartridges/cartridges/steam_importer.py", line 172, in steam_importer
    for open_file in (directory / "steamapps").iterdir():
  File "/usr/lib/python3.10/pathlib.py", line 1017, in iterdir
    for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/media/alexander/A83448273447F73A/Program Files (x86)/Steam/steamapps'

To Reproduce

  1. Create a temporary folder
  2. Add the temp folder as a game folder in Steam.
  3. Close Steam.
  4. Change the name of the temp folder.
  5. Open Steam.
  6. Add the renamed folder as a game folder in Steam.
  7. Run Cartridges's steam importer.

Steps to reproduce the behavior:

  1. Create a temporary folder.
  2. In Steam, add a library path to the temporary folder.
  3. Rename the folder.
  4. In Steam, add a library path to the renamed folder.
  5. Run Cartridges's importer.

Expected behavior
The program should continue to iterate even with a FileNotFoundError. It should pass past that path and continue to the next.

Screenshots
Same image, but on Imgur
Screenshot from 2023-05-27 09-38-45

System (please complete the following information):

  • OS: Linux Mint 21.1 Cinnamon
  • Installation method: Flatpak

Additional context
Steam apparently keeps track of library folders in locations that no longer exist, such as external media drives, so that they show up in Steam when reconnected. My use case here is that the folders cannot be removed from the library list as I have moved the mount location of the external drives.

@NotYourAlejandro NotYourAlejandro added the bug Something isn't working label May 27, 2023
@kra-mo
Copy link
Owner

kra-mo commented May 27, 2023

Hi, this should be fixed in the latest version.

Could you update and see if the issue still persists?

@NotYourAlejandro
Copy link
Author

There isn't an update available on Flathub, and there aren't any changes on any branches at the time of writing. Is there somewhere else you placed your changes?

@kra-mo
Copy link
Owner

kra-mo commented May 27, 2023

Are you on version 1.5.4?

@NotYourAlejandro
Copy link
Author

Currently on 1.5.3 via Flathub, but no updates are available. I did see that you updated the gali-importer-structure branch recently. Would you like me to build from source from that branch?

@kra-mo
Copy link
Owner

kra-mo commented May 27, 2023

No, the changes are on Flathub.

You could try to update via flatpak update, that should force a refresh.

@NotYourAlejandro
Copy link
Author

Just got the changes, and they work. Thanks for the response! Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants