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

Flatpak: ModuleNotFoundError: No module named 'steam #12

Open
DScottArch opened this issue Jan 13, 2022 · 10 comments
Open

Flatpak: ModuleNotFoundError: No module named 'steam #12

DScottArch opened this issue Jan 13, 2022 · 10 comments

Comments

@DScottArch
Copy link

I have a different path for Steam through Flatpak, I tried pointing to Steam and com.valvesoftware.Steam and netiher one works with the script. Any help would be appreciated.

@gasinvein
Copy link
Owner

You need vdf and steam Python modules; install via e.g. python3 -m pip install --user vdf steam

@DScottArch
Copy link
Author

I was looking in /var not ~/.var. Sorry about that. I installed vdf and steam modules, and the script ran, but desktop icons still not showing up.

@gasinvein
Copy link
Owner

Did the script find any games? Can you please show its console output?

@DScottArch
Copy link
Author

DScottArch commented Jan 15, 2022

It's finding the games, but not seeing them on desktop.


> steam-desktop-script]$ ./steam_desktop_updater.py ~/.var/app/com.valvesoftware.Steam/data/Steam
> INFO:root:Searching library folders
> INFO:root:Collecting apps in folder /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam
> INFO:root:Loading 11 apps from appinfo.vdf
> INFO:root:Processing app ID 611500 : Quake Champions
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/f1d4be57d4628c6d6208fb06d37f4f42c19360b7.ico
> INFO:root:Processing app ID 252950 : Rocket League
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/3ea06e4358d60a692914fd961298de33ad4073b2.ico
> INFO:root:Processing app ID 504370 : Battlerite
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/7e7b604aae9c88fdad1e4286c9cc1314bcad2b8d.ico
> INFO:root:Processing app ID 879160 : Battlerite Royale
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/9248a81e020e423b1d9e1ef609cf0cb1074a05f9.ico
> INFO:root:Processing app ID 1600530 : 3D Aim Trainer
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/e492d3abcf2b3ad1a25ae32b6e379da9f1a6ae41.ico
> INFO:root:Processing app ID 386360 : SMITE
> INFO:root:Extracting icon(s) from /home/greyside/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam/games/28bbf3e47b12772da20420f78fa741f05c1a0e05.ico

@DScottArch
Copy link
Author

DScottArch commented Jan 15, 2022

I tried again setting the -d option to ~/Desktop and got the applications and icons folders.

@DScottArch
Copy link
Author

DScottArch commented Jan 15, 2022

I edited the script:

def save_desktop_entry(self, destdir: Path, steam_cmd: str = DEFAULT_STEAM_CMD):
        app_desktop = DesktopFileParser()
        app_desktop.read_dict(self.get_desktop_entry(steam_cmd))

        ### Changed app_desktop_file directory:
        ### From: app_desktop_file = destdir / 'applications' / f'{self.desktop_name}.desktop'
        ### To app_desktop_file = destdir / f'{self.desktop_name}.desktop'
 
        app_desktop_file = destdir / f'{self.desktop_name}.desktop'
        logging.info('save_desktop_entry - %s', app_desktop_file)
        app_desktop_file.parent.mkdir(parents=True, exist_ok=True)
        with app_desktop_file.open('w') as df:
            app_desktop.write(df, space_around_delimiters=False)

Commented out app.extract_icons(destdir) in def create_desktop_data() function to make sure icons folder wasn't extracted to desktop.

Now it's working as expected.

Thank you for your work on this script! I learned a lot reading through it, maybe will start making my own :)

@gasinvein
Copy link
Owner

You shouldn't normally need the -d option (and setting the target to ~/Desktop is surely wrong).
By default it writes .desktop entries and icons to ~/.local/share, from where most DE should pick it up. Did you try re-logging into your DE?

@DScottArch
Copy link
Author

It went to ~/.local/share, but wasn't showing up on the desktop. I'll double check just to make sure I didn't do something else wrong.

@gasinvein
Copy link
Owner

That's strange, .desktop files from ~/.local/share should've shown up. What's your DE?

@DScottArch
Copy link
Author

Cinnamon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants