scottrice / pysteam Goto Github PK
View Code? Open in Web Editor NEWPython API for accessing local Steam information
License: MIT License
Python API for accessing local Steam information
License: MIT License
I can easily figure out the steam run URL, so it wouldnt be a bad idea to allow the creation of a desktop shortcut as a function of Game
.
[ERROR] An exception occurred while running Ice
Traceback (most recent call last):
File "ice/decorators.py", line 9, in wrapped
func(*args, **kwargs)
File "ice/cli/runner.py", line 108, in run
dry_run=opts.dry_run
File "ice/tasks/engine.py", line 26, in run
task(app_settings, self.users, dry_run=dry_run)
File "ice/tasks/shortcuts.py", line 35, in __call__
dry_run=dry_run)
File "ice/steam_shortcut_synchronizer.py", line 105, in sync_roms_for_user
shortcuts.set_shortcuts(user, updated_shortcuts)
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/shortcuts.py", line 41, in set_shortcuts
write_shortcuts(paths.shortcuts_path(user_context), shortcuts)
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/shortcuts.py", line 30, in write_shortcuts
vdf_contents = ShortcutGenerator().to_string(shortcuts)
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/_shortcut_generator.py", line 20, in to_string
string = x00 + 'shortcuts' + x00 + self.generate_array_string(shortcuts) + x08 + x08 + x0a
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/_shortcut_generator.py", line 29, in generate_array_string
string += x00 + str(i) + x00 + self.generate_shortcut_string(shortcut)
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/_shortcut_generator.py", line 34, in generate_shortcut_string
string += self.generate_keyvalue_pair("AppName",shortcut.name)
File "/usr/local/lib/python2.7/dist-packages/pysteam-1.0.0b2-py2.7.egg/pysteam/_shortcut_generator.py", line 53, in generate_keyvalue_pair
return x01 + key + x00 + value + (x00 if more else x08)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
I printed out the key
& value
inside the generate_keyvalue_pair
function and the offending value was: ('AppName', '[N64] Pok\xc3\xa9mon Snap')
Along with checking for ~/.local/share/Steam/userdata
do a failover/alternative check of ~/.steam/steam/userdata
as well as $XDG_DATA_HOME
It appears there's a new values for the shortcuts.vdf file. There's a couple new key-value pairs that pysteam doesn't account for. SteamShard's API has some basic documentation of the new fields:
https://github.com/PsychoTheHedgehog/SteamShard/wiki/T_SteamShard_Shortcuts
It looks like some of the new fields are preceded by a u0002
character rather than u0001
. This could be because they're optional, or because the number denotes the version # of the shortcuts file format? There's also some empty files. It would probably be best to switch away from static regex formatting.
If the steam user 'anonymous' is present in steam's userdata folder, steam.py, line 77 will throw this exception:
ValueError: invalid literal for int() with base 10: 'anonymous'
I'm not sure what steam user 'anonymous' is or what it does exactly, but it's the default profile on a fresh SteamOS install, so unless you delete the anonymous user manually, pysteam will crash on SteamOS.
Maybe add some sort of special case for this? Or just ignore it?
Your 1.0.0-b2 package on pypi containts:
version='1.0.0-beta2'
This conflicts with the b2 in requirements.txt. Once corrected to b2 in the version line, it will work.
Corrected package (of course I can't change your b2):
https://pypi.python.org/pypi/pysteam-steamos/1.0.0-b2
See:
#6
The user module was removed in Python 3 so steam.py fails. There isn't much more information about other than the fact that it's removed. The functionality does not seem to be replicated in the compatibility library six either. I have no idea how to fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.