Ryochan7 / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
177 stars 23 forks source link

Error when importing .vdf file #50

Closed JoshTheTofu closed 2 years ago

JoshTheTofu commented 2 years ago

Hi Ryochan7

Thank-you for this awesome piece of software, I use it all the time on my PC.

Recently I made a config on Steam and wanted to export it to SC-Controller as SC-Controller is more reliable and stable than Steam when running games on my PC and I came across the error below. I used the drag and drop method

I'm not sure whether I have done anything wrong or whether there is another step for me to make, please help if you can.

`Unknown button: 'button_a' Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/scc/gui/importexport/import_vdf.py", line 379, in import_vdf self._profile.load(filename) File "/usr/lib/python3.10/site-packages/scc/foreign/vdf.py", line 598, in load self.load_data(data) File "/usr/lib/python3.10/site-packages/scc/foreign/vdf.py", line 614, in load_data VDFProfile._load_preset(data, self, p) File "/usr/lib/python3.10/site-packages/scc/foreign/vdf.py", line 555, in _load_preset profile.parse_input_binding(data, group_id, binding) File "/usr/lib/python3.10/site-packages/scc/foreign/vdf.py", line 469, in parse_input_binding self.parse_switches(group) File "/usr/lib/python3.10/site-packages/scc/foreign/vdf.py", line 460, in parse_switches raise ParseError("Unknown button: '%s'" % (button,)) scc.parser.ParseError: Unknown button: 'button_a'

Profile filename: /home/josh/.steam/steam/steamapps/workshop/content/gamepad with mouse and gyro_0.vdf

Profile dump: "controller_mappings" { "version" "3" "revision" "8" "title" "Gamepad with Mouse and Gyro" "description" "Your modified configuration for this game." "creator" "76561198045536233" "progenitor" "" "export_type" "unknown" "controller_type" "controller_steamcontroller_gordon" "major_revision" "0" "minor_revision" "0" "Timestamp" "-991961104" "localization" { "english" { "title" "Gamepad with Mouse and Gyro" "description" "The template works best for games that are designed with a gamepad in mind, but also support a desktop mouse for camera control or aim. This uses both the right pad and the gyro to allow for the most precise aim in games which support gamepad and mouse." } } "group" { "id" "0" "mode" "four_buttons" "description" "" "inputs" { "button_a" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button A" } } } "disabled_activators" { } } "button_b" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button B" } } } "disabled_activators" { } } "button_x" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button X" } } } "disabled_activators" { } } "button_y" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button Y" } } } "disabled_activators" { } } } } "group" { "id" "1" "mode" "dpad" "description" "" "inputs" { "dpad_north" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button dpad_up" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } "dpad_south" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button dpad_down" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } "dpad_east" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button dpad_right" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } "dpad_west" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button dpad_left" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } } } "group" { "id" "2" "mode" "joystick_camera" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button JOYSTICK_RIGHT" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } } } "group" { "id" "3" "mode" "joystick_move" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button JOYSTICK_LEFT" } "settings" { "haptic_intensity" "2" } } } "disabled_activators" { } } } } "group" { "id" "4" "mode" "trigger" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button TRIGGER_LEFT" } "settings" { "haptic_intensity" "2" } } } "disabled_activators" { } } } "settings" { "output_trigger" "1" } } "group" { "id" "5" "mode" "trigger" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button TRIGGER_RIGHT" } "settings" { "haptic_intensity" "2" } } } "disabled_activators" { } } } "settings" { "output_trigger" "2" } } "group" { "id" "6" "mode" "absolute_mouse" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button JOYSTICK_RIGHT" } "settings" { "haptic_intensity" "1" } } } "disabled_activators" { } } } "settings" { "sensitivity" "223" "doubetap_max_duration" "324" } } "group" { "id" "7" "mode" "joystick_move" "description" "" "inputs" { "click" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button JOYSTICK_RIGHT" } "settings" { "haptic_intensity" "2" } } } "disabled_activators" { } } } } "group" { "id" "8" "mode" "absolute_mouse" "description" "" "inputs" { } "settings" { "sensitivity" "83" "haptic_intensity" "0" "acceleration" "2" } } "group" { "id" "10" "mode" "mouse_joystick" "description" "" "inputs" { } } "group" { "id" "11" "mode" "mouse_joystick" "description" "" "inputs" { } } "group" { "id" "12" "mode" "joystick_move" "description" "" "inputs" { } } "group" { "id" "13" "mode" "disabled" "description" "" } "group" { "id" "14" "mode" "disabled" "description" "" } "group" { "id" "9" "mode" "switches" "description" "" "inputs" { "button_escape" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button start" } } } "disabled_activators" { } } "button_menu" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button select" } } } "disabled_activators" { } } "left_bumper" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button shoulder_left" } } } "disabled_activators" { } } "right_bumper" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button shoulder_right" } } } "disabled_activators" { } } "button_back_left" { "activators" { "Full_Press" { "bindings" { "binding" "mode_shift right_trackpad 12" } "settings" { "interruptable" "0" } } } "disabled_activators" { } } "button_back_right" { "activators" { "Full_Press" { "bindings" { "binding" "xinput_button A" } "settings" { "hold_repeats" "1" } } } "disabled_activators" { } } } } "group" { "id" "15" "mode" "disabled" "description" "" } "preset" { "id" "0" "name" "Default" "group_source_bindings" { "9" "switch active" "2" "right_trackpad inactive" "6" "right_trackpad inactive" "7" "right_trackpad inactive" "10" "right_trackpad active" "12" "right_trackpad active modeshift" "0" "button_diamond active" "1" "left_trackpad active" "3" "joystick active" "4" "left_trigger active" "5" "right_trigger active" "8" "gyro inactive" "11" "gyro active" } } "settings" { } }`

Ryochan7 commented 2 years ago

It looks like this issue was fixed in commit 03ea18529e5f751af871f5d5b01c72f408b80361. No new release has been made since that fix was implemented; the last release was back in September. Probably should make a patch release sometime soon. I'll keep this issue open until I get around to creating a new release.

Ryochan7 commented 2 years ago

A new release with an updated AppImage has been published that includes this fix. Since a new release has been published, it should be safe to close this issue.

https://github.com/Ryochan7/sc-controller/releases/tag/v0.4.8.7